질문이 2 개 있습니다.XAML에서 Run Object 실행
첫 번째. Windows 7 용 Silverlight를 사용하고 있으며 바인딩에 문제가 있습니다.
내가 내가 ModeValue의 TextBlock의 바인딩 TemplateBinding을 사용하여이
<Style TargetType="RadioButton" x:Key="VoltageTab">
<Setter Property="Width" Value="95"/>
<Setter Property="Height" Value="61"/>
<Setter Property="Margin" Value="193,0,192,3"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Bottom"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Grid Background="#00000000">
<Image x:Name="UnCheckedimg" Source="12.png"/>
<Image x:Name="Checkedimg" Visibility="Collapsed" Source="11.png"/>
<TextBlock x:Name="ModeName" FontSize="20" FontFamily="Alternate_Gothic_No.ttf#Alternate-Gothic-No3" Text="VOLTAGE" Foreground="#D25A32" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0,4,0,0" />
<TextBlock x:Name="ModeValue" FontSize="20" FontFamily="Alternate_Gothic_No.ttf#Alternate-Gothic-No3" Text="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,2"/>
<TextBlock x:Name="ModeNameChecked" Visibility="Collapsed" FontSize="34" FontFamily="Alternate_Gothic_No.ttf#Alternate-Gothic-No3" Text="VOLTAGE" Foreground="Black" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,0,0" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
같은 템플릿을 가지고,하지만 난 다른 ModeName을 바인딩 바인딩 필요가 없다. 언젠가는 어떻게 할 수 있겠습니까? 난 경우 나 alowe 편집기 didnt 한이 여기에 게시 할 수 있기 때문에 2 스타일이 아래에 게시
그것은 확인을 작동합니다
내가 다른 스타일을 가지고편집은
-
단지 텍스트를 내용으로 집어 넣지 만, 버튼 안에 텍스트를 포맷 할 수 있도록 객체를 실행하고 싶습니다.
이것이 가능한가요? 그렇지 않다면 이것을 달성 할 다른 방법이 있습니까?
Windows 용 Silverlight를 사용한다는 점에 유의하십시오.
안부, 루카 easyer 표현
<Style x:Key="FunctionSelectButton" TargetType="RadioButton">
<Setter Property="Width" Value="154"/>
<Setter Property="Height" Value="61"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Grid Background="#00000000">
<Image x:Name="NormalImg" Source="mode_unpressed.png" Stretch="None"/>
<TextBlock x:Name="NormalText" Foreground="#D25A32" FontSize="26" FontFamily="Alternate_Gothic_No.ttf#Alternate-Gothic-No3" HorizontalAlignment="Center" Text="{TemplateBinding Content}" VerticalAlignment="Center" Margin="0,0,0,0"></TextBlock>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
이미지 ->
야 루카, 나는 문제가 당신이 요구하는지하지만 어쩌면 짧은을 할 수 있는지 이해하는 데 네가 원하는 것을 그림으로 표현하면 더 잘 묘사 할 수 있을까? –
나는 그림을 그렸다, 나는 그 것이 더 분명 할 것이기를 바란다. –