Ho le seguenti due pulsanti in XAML:Come posso definire una variabile in XAML?
<Button Content="Previous"
Margin="10,0,0,10"/>
<Button Content="Next"
Margin="0,0,10,10"/>
Come Posso definire "10" per essere una variabile in modo da poter cambiare in un unico luogo, qualcosa di simile:
PSEUDO CODICE:
<variable x:key="theMargin"/>
<Button Content="Previous"
Margin="{Variable theMargin},0,0,{Variable theMargin}"/>
<Button Content="Next"
Margin="0,0,{Variable theMargin},{Variable theMargin}"/>
hmmm, aggiungo 2.35 System: Double> in Window.Resources e ottenuto "System: Double non trovato", ha aggiunto "System" come riferimento ma non ha fatto t aiuto, cosa mi manca? –
Il doppio non viene visualizzato nel menu a discesa, solo per es. "RegistryHive" e altri tre, ho riferimenti System.Core, cos'altro devo fare riferimento? –
Ho trovato il mio problema: stavo aggiungendo questo xmlns: System = "clr-namespace: Microsoft.Win32; assembly = mscorlib" e avrei dovuto aggiungere: xmlns: System = "clr-namespace: System; assembly = mscorlib" –