Isidro Padilla

Isidro Padilla

  • NA
  • 114
  • 805

Problems with Ñ or tildes in .xaml files.

Feb 1 2019 10:44 AM
Problems with Ñ and tildes in .XAML files
When I use Ñ or tildes in the labels of the .XAML files, errors occur when compiling the application.
In the attached example I get errors when I accentuate the Tags Category, Code, Description, etc. This using visual Studio 2017 community in Spanish (Spain)
Can someone explain to me how to solve this problem?
Thank you very much for your comments.
The closest thing I've found in the forums forum: https://social.msdn.microsoft.com/Forums/es-ES/c4b1ab9a-d7a0-4fbb-ad56-2bdbe406f7a3/problemas-con-las-y-tildes -? forum = netfxwebes, but I see that it was left unresolved.
<Window x:Class="CapaPresentacion.FrmCategoria"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title=".:. Mantenimiento de Categorias .:.">
<Grid Height="441" Width="754">
<TabControl Name="tabControl1" Height="356" Width="730" TabStripPlacement= "Top" Margin="2,58,22,27" HorizontalAlignment="Right" VerticalAlignment="Bottom" >
<TabItem Name="tabPage1" Header="Listado" >
<Canvas Name="cantabPage1" Height="327" Width="722" >
<DataGrid Name="dataListado" Height="203" Width="672" Margin="4,92,78,146" HorizontalAlignment="Right" VerticalAlignment="Bottom" >
<DataGrid.Columns>
<DataGridCheckBoxColumn Header="Eliminar" Width="100" />
</DataGrid.Columns>
</DataGrid>
<Label Name="lblTotal" Height="26" Width="110" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="6" HorizontalAlignment="Right" VerticalAlignment="Bottom" Canvas.Left="503" Canvas.Top="64" >Total de Registro:</Label>
<CheckBox Name="chkEliminar" Height="21" Width="80" TabIndex="5" Margin="4,64,670,356" HorizontalAlignment="Right" VerticalAlignment="Bottom" Checked="chkEliminar_CheckedChanged" >Eliminar</CheckBox>
<Button Name="btnImprimir" Height="35" Width="117" TabIndex="4" Background="Silver" Click="btnImprimir_Click" Margin="559,18,78,388" HorizontalAlignment="Right" VerticalAlignment="Bottom" >&amp;Imprimir</Button>
<Button Name="btnEliminar" Height="35" Width="108" TabIndex="3" Background="Silver" Click="btnEliminar_Click" Margin="429,18,217,388" HorizontalAlignment="Right" VerticalAlignment="Bottom" >&amp;Eliminar</Button>
<Button Name="btnBuscar" Height="35" Width="105" TabIndex="2" Background="Silver" Click="btnBuscar_Click" Margin="302,18,347,388" HorizontalAlignment="Right" VerticalAlignment="Bottom" >&amp;Buscar</Button>
<TextBox Name="txtBuscar" Height="22" Width="176" TabIndex="1" TextChanged="txtBuscar_TextChanged" Margin="94,20,484,399" HorizontalAlignment="Right" VerticalAlignment="Bottom" TextWrapping="Wrap" ></TextBox>
<Label Name="label2" Height="26" Width="71" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="0" Margin="24,20,659,395" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Nombre:</Label>
</Canvas>
</TabItem>
<TabItem Name="tabPage2" Header="Mantenimiento" >
<Canvas Name="cantabPage2" Height="327" Width="722" >
<GroupBox Margin="14,6,67,150" HorizontalAlignment="Right" VerticalAlignment="Bottom" >
<GroupBox.Header>
<TextBlock Text="Categorias"/>
</GroupBox.Header>
<Canvas Height="261" Width="649" >
<Button Name="btnCancelar" Height="33" Width="107" TabIndex="9" Background="LightGray" Click="btnCancelar_Click" Margin="501,210,146,198" HorizontalAlignment="Right" VerticalAlignment="Bottom" >&amp;Cancelar</Button>
<Button Name="btnEditar" Height="33" Width="107" TabIndex="8" Background="LightGray" Click="btnEditar_Click" Margin="365,210,282,198" HorizontalAlignment="Right" VerticalAlignment="Bottom" >E&amp;ditar</Button>
<Button Name="btnGuardar" Height="33" Width="107" TabIndex="7" Background="LightGray" Click="btnGuardar_Click" Margin="238,210,409,198" HorizontalAlignment="Right" VerticalAlignment="Bottom" >&amp;Guardar</Button>
<Button Name="btnNuevo" Height="32" Width="107" TabIndex="6" Background="LightGray" Click="btnNuevo_Click" Margin="107,210,540,199" HorizontalAlignment="Right" VerticalAlignment="Bottom" >&amp;Nuevo</Button>
<TextBox Name="txtDescripcion" Height="52" Width="300" TabIndex="5" Background="PapayaWhip" Margin="107,120,347,269" HorizontalAlignment="Right" VerticalAlignment="Bottom" TextWrapping="Wrap" ></TextBox>
<TextBox Name="txtNombre" Height="22" Width="300" TabIndex="4" Background="PapayaWhip" Margin="107,72,347,347" HorizontalAlignment="Right" VerticalAlignment="Bottom" TextWrapping="Wrap" ></TextBox>
<TextBox Name="txtIdcategoria" Height="22" Width="125" TabIndex="3" Background="PapayaWhip" Margin="107,24,522,395" HorizontalAlignment="Right" VerticalAlignment="Bottom" TextWrapping="Wrap" ></TextBox>
<Label Name="label5" Height="26" Width="95" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="2" Margin="30,120,629,295" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Descripcion:</Label>
<Label Name="label4" Height="26" Width="71" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="1" Margin="27,72,656,343" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Nombre:</Label>
<Label Name="label3" Height="26" Width="65" FontSize="11" FontFamily="Microsoft Sans Serif" TabIndex="0" Margin="24,30,665,385" HorizontalAlignment="Right" VerticalAlignment="Bottom" >Codigo:</Label>
</Canvas>
</GroupBox>
</Canvas>
</TabItem>
</TabControl>
<Label x:Name="label1" Height="45" Width="177" FontSize="24" FontFamily="Microsoft Sans Serif" TabIndex="0" Foreground="Maroon" Margin="24,5,553,391" HorizontalAlignment="Right" VerticalAlignment="Bottom" Content="Categorias" />
<Image HorizontalAlignment="Left" Height="49" Margin="252,1,0,0" VerticalAlignment="Top" Width="59" Source="Recursos/Categorias-Mant.png"/>
</Grid>
</Window>

Answers (1)