c# - WPF Property Target for Style Trigger -


I am defining a custom datagrid text cloud with the "tag" property added to the datagram, as

  & lt; Local: DataGridTextColumn binding = "{binding path = company}" header = "company" tag = "string" isReadOnly = "true" />   

I have defined some resources XAML to control rendering of the grid, but I have a problem. Based on the value of the "tag" property using the triggers, I would like to render a custom context menu on the DataGridColumnHeader. However, I can not find a way to style the column "tag" value to reference, I try the datatyagger and the regular trigger Is of

  & gt; Style target type = "{x: type datagrid column header}" & gt; & Lt; Style.Triggers & gt; & Lt; DataTrigring Binding = "{Binding Relative Soros = {relative serge ancestor type = local: datagrid text cluM}, path = tag}" value = "string" & gt; & Lt; Setter property = "context menu" value = "{static resource column header context menu}" /> & Lt; / DataTrigger & gt; & Lt; Trigger Property = "Tag" Value = "Int" & gt; & Lt; Setter property = "context menu" value = "{static resource column headercontain menuIN}" / & gt; & Lt; / Catalyst & gt; & Lt; Trigger Property = "Tag" Value = "Date Time" & gt; & Lt; Setter property = "context menu" value = "{static resetter column header-context menu}" /> & Lt; / Catalyst & gt; & Lt; /Style.Triggers> Applying style decisions at design time, by changing tag property to apply  

Do not have a style on runtime?

If you can change tags on design time, then you can follow the column headers by following a specific style.

It is not clear why the Rube Goldberg method of setting a design time style is necessary.

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? -