Can't get a simple control template to work
I filed a bug https://www.noesisengine.com/bugs/view.php?id=1507
But what I'm trying to do is do some pretty basic stuff to learn XAML and Noesis. I've got a unity project where I am experimenting with mocking up a UI in blend and testing it in Unity. Just as I started to try and make some control templates to start making some reusable components, I start to run into an issue where a style/template that works fine in Blend refuses to work in Noesis and I don't understand why. I'm not getting any errors in Noesis.
Basically I have the following template
Blend Unity
But what I'm trying to do is do some pretty basic stuff to learn XAML and Noesis. I've got a unity project where I am experimenting with mocking up a UI in blend and testing it in Unity. Just as I started to try and make some control templates to start making some reusable components, I start to run into an issue where a style/template that works fine in Blend refuses to work in Noesis and I don't understand why. I'm not getting any errors in Noesis.
Basically I have the following template
The class is very simply<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006 ... esentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:MapMakerUI">
<Style x:Key="SingleSelection" TargetType="{x:Type local:RadioToggleButton}">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Button Width="100" Height="100" Background="{DynamicResource Image_Wait}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
And I have them in a WrapPanel like sonamespace MapMakerUI
{ class RadioToggleButton : RadioButton
{
}
}
As the screenshots show, they work fine in Blend, showing my placeholder clock icon on large 100x100 buttons, but when I load this same Xaml in Unity, they show up as simple radio buttons with no warnings or anything.<local:RadioToggleButton Style="{DynamicResource SingleSelection}"/>
Blend Unity
-
sfernandez
Site Admin
- Posts: 2983
- Joined:
Re: Can't get a simple control template to work
I answered in the bug #1507, could you please confirm it solves the problem?
Who is online
Users browsing this forum: Google [Bot] and 8 guests