0
我正在Windows Compact設備上編寫應用程序,並希望使用Silverlight獲取豐富的UI元素。從Expression Blend創建的Silverlight表單只能用於C++而不用於C#。如何獲得用於C#的Windows Compact 2013的Silverlight或XAML?
是否有可能使用C#執行此操作,或者有沒有其他Silverlight替代方法可用於外觀良好的用戶界面?
我正在Windows Compact設備上編寫應用程序,並希望使用Silverlight獲取豐富的UI元素。從Expression Blend創建的Silverlight表單只能用於C++而不用於C#。如何獲得用於C#的Windows Compact 2013的Silverlight或XAML?
是否有可能使用C#執行此操作,或者有沒有其他Silverlight替代方法可用於外觀良好的用戶界面?
你實際上是添加一個空行控件之間,即:Grid.Row="0
「爲Label
和Grid.Row="2"
爲Button
應該按順序像圖所示::
<Label x:Name="Screen"
Text=""
Grid.Row="0" Grid.Column="0"
Grid.ColumnSpan="4"
FontSize="50"
TextColor="Black"
BackgroundColor="White"
HorizontalTextAlignment="End"
VerticalTextAlignment="End"/>
<Button x:Name="Button1"
Text="1"
FontSize="40"
TextColor="White"
BackgroundColor="Aquamarine"
Grid.Row="1" Grid.Column="0"
Clicked="Button1_Clicked"/>
我也建議的任務。製作計算器(如在http://www.shopdigit.com/Engineering-Calculator-VOLTA-814-R814-0-03.htm工作的應用程序)的使用單獨的資源文件,並確保設置屬性
<ContentPresenter VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
你也可以使用'center
'樣品實際執行中的屬性:
<!--TEXT BLOCK-->
<Style x:Key="TextBlock_Generic">
<Setter Property="TextBlock.VerticalAlignment" Value="Center"/>
<Setter Property="TextBlock.HorizontalAlignment" Value="Center"/>
<Setter Property="TextBlock.Padding" Value="0"/>
<Setter Property="TextBlock.Margin" Value="0"/>
<Setter Property="TextBlock.FontSize" Value="14" />
</Style>
希望這可能有所幫助。
我沒有在這裏包括整個代碼。在後面的部分中,我使用這一行。我實際上做了一個計算器,'+',' - ','*'和'/'進入第1行,數字1,2,3 ...從第2行開始。 – Aneesh
請閱讀我的擴展答案。此外,如果您包含整個代碼段,則會更好,否則很難重現此問題。最好的問候, –
非常感謝!我會盡快上傳整個代碼,並嘗試這一點。 – Aneesh