更新1如何從Windows Store App中的代碼創建ControlTemplate?
如果控件模板已經綁定,將XamlReader.Load(...)
工作?
<ControlTemplate TargetType="charting:LineDataPoint">
<Grid>
<ToolTipService.ToolTip>
<ContentControl Content="{Binding Value,Converter={StaticResource DateToString},ConverterParameter=TEST}"/>
</ToolTipService.ToolTip>
<Ellipse Fill="Lime" Stroke="Lime" StrokeThickness="3" />
</Grid>
</ControlTemplate>
我想從後面的代碼實現這一目標。
<ControlTemplate>
<Ellipse Fill="Green" Stroke="Red" StrokeThickness="3" />
</ControlTemplate>
我搜索了很多的所有都顯示的ControlTemplate FrameworkElementFactory
& VisualTree
財產。這些不適用於Windows應用商店的.NET。
任何人都知道從代碼背後創建ControlTemplate
?
我已經知道這個解決方案。 – Xyroid
我的控件模板也有綁定,會起作用嗎?查看相關更新。 – Xyroid