Sample controls usage


 

hi all, 

what best practice use i.e. button sample control when need different button styles inside same app? should make copy of both button.xaml , button.cs every different button. this takes me question: how know button.cs elements referenced objects inside defined in button.xaml? dont see x:class namespace inside of xaml of controls.

 thanks in advance,

alex

for control samples, code controls loads xaml assembly a resource. depending on whether using button declaratively or through code dictate mechanism use.

you add parameterized constructor button takes key style want, , load appropriate xaml based on key. don't think use declaratively call default constructor

or 

you sub-class button , in new class load right xaml. way stil treat button base class code, use different variants need to. can used declaratively there different classes each of styles.



Silverlight  >  Programming Silverlight with .NET – General



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........