Pregunta

intento crear String, recursos Int32 como a continuación pero no funciona. Tengo el error diciendo que el valor no se puede convertir.

Si usted sabe cómo hacer esto por favor ayuda.

<ResourceDictionary 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <sys:Int32 x:Key="MyKey">1</sys:Int32>
</ResourceDictionary>

<Label Content="abb" BorderThickness="{StaticResource MyKey}" />
¿Fue útil?

Solución

El tipo de BorderThickness es System.Windows.Thinkness no Int32

<Thickness x:Key="MyKey" >1</Thickness>

Buena suerte!

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top