locked
Problem when create my button RRS feed

  • Question

  •  when I create my button , my button is replace by this message "as the prefix name space "is not a URI namespace, the resolution of property" IsFocused "is not available. Error on line 48 position 37."
    I don't understand ...
    Wednesday, May 21, 2008 11:06 AM

Answers

  • MrBean20000,

    Are you able to post the XAML file or a small sample file that reproduces the error? 

    Jonathan - MSFT

    This posting is provided "AS IS" with no warranties and confers no rights
    Friday, May 23, 2008 8:30 PM

All replies

  • MrBean20000,

    Are you able to post the XAML file or a small sample file that reproduces the error? 

    Jonathan - MSFT

    This posting is provided "AS IS" with no warranties and confers no rights
    Friday, May 23, 2008 8:30 PM
  •  

    <wpf:Window
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     xmlns:wpf="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
     x:Class="UntitledProject3.Window1"
     x:Name="Window"
     Title="Window1"
     Width="640" Height="480">

     <wpf:Window.Resources>
      <wpf:Style x:Key="ButtonStyle1" BasedOn="{x:Null}" TargetType="{x:Type wpf:Button}">
       <wpf:Setter Property="Template">
        <wpf:Setter.Value>
         <wpf:ControlTemplate TargetType="{x:Type wpf:Button}">
          <wpf:Grid>
           <wpf:Ellipse Fill="#FF980000" Stroke="#FF000000"/>
           <wpf:ContentPresenter SnapsToDevicePixels="{wpf:TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{wpf:TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{wpf:TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/>
          </wpf:Grid>
          <wpf:ControlTemplate.Triggers>
           <wpf:Trigger Property="IsFocused" Value="True"/>
           <wpf:Trigger Property="IsDefaulted" Value="True"/>
           <wpf:Trigger Property="IsMouseOver" Value="True"/>
           <wpf:Trigger Property="IsPressed" Value="True"/>
           <wpf:Trigger Property="IsEnabled" Value="False"/>
          </wpf:ControlTemplate.Triggers>
         </wpf:ControlTemplate>
        </wpf:Setter.Value>
       </wpf:Setter>
      </wpf:Style>
     </wpf:Window.Resources>
     <wpf:Button Style="{wpf:DynamicResource ButtonStyle1}"/>
    </wpf:Window>

    Tuesday, May 27, 2008 9:50 AM