wpf - Windows Phone 8.1, How to bind style to view? -


I've written a style for the button. Unfortunately, I had to face a problem: the font size of the button depends on one value, which I use in the only view (in particular, this DisplayInformation stuff) I can count on

Ideally, I will do the following:

  & lt; Style x: key = "MyStyle" basedOn = "{StaticResource SomeStyle}" TargetType = "Button" & gt; & Lt; Setter Property = "FontSys" value = "{binding element name = root control, path = some property" /> & Lt; / Style & gt;   

Then, I only provide the necessary properties in the visual category.

How can I solve this problem?

Specifying the bond in the setter value is not supported in the Windows runtime (supported in WPF and Silverlight 5 Maybe, though).

If you are a Google near work, then you are working, but they are like Hank. See, which uses the attached properties and the binding assistant class.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -