1
これをテストするためのMacintoshへのアクセス権がありません(つまり、Xamarin Macコンポーネントを読み込めません)ので、これをテストする方法はありません。しかし...以下は、WPFアプリケーションのXAMLです。アプリケーションのほとんどすべてがXamarinに準拠しているように見えます.WebClientの呼び出し、フォームフィールドへのXMLDocumentやバインディングの挿入などがありますが、XAMLが準拠しているかどうかはわかりません。だから、ここにある:XAMLファイルはXamarin Macintoshに移植可能ですか?
<Window x:Class="IMManager.ImManagerWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="IMM Media Manager"
SnapsToDevicePixels="True"
WindowState="Normal"
MaxWidth="720"
ResizeMode="NoResize"
WindowStartupLocation="CenterScreen">
<Window.Resources>
<Style x:Key="AlternatingListViewItemStyle" TargetType="{x:Type ListViewItem}">
<Style.Triggers>
<!-- setting up triggers for alternate background colors -->
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
<Setter Property="Background" Value="LightGray"></Setter>
</Trigger>
<Trigger Property="ItemsControl.AlternationIndex" Value="2">
<Setter Property="Background" Value="White"></Setter>
</Trigger>
</Style.Triggers>
<!-- setting row height here -->
<Setter Property="Height" Value="25" />
</Style>
</Window.Resources>
<ListView x:Name="LvAlbums" ItemsSource="{Binding XPath=/downloads/Album}" Width="680">
<ListView.ItemTemplate>
<DataTemplate x:Name="dt1">
<StackPanel x:Name="spAlbum" HorizontalAlignment="Left">
<TextBlock
Text="{Binding [email protected],StringFormat='Artist: {0}'}"
FontSize="16px"
/>
<TextBlock
Text="{Binding [email protected],StringFormat='Album: {0}'}"
FontSize="16px"
/>
<ListView x:Name="lvTracks" ItemsSource="{Binding XPath=Item}" ItemContainerStyle="{StaticResource AlternatingListViewItemStyle}" AlternationCount="2">
<ListView.View>
<GridView>
<GridViewColumn Header="Track" Width="460">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock x:Name="trackName" Text="{Binding [email protected]}" Width="450" LineHeight="25" Height="25" VerticalAlignment="Center" Margin="0,3,0,0">
</TextBlock>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="Progress" Width="175">
<GridViewColumn.CellTemplate>
<DataTemplate>
<Canvas VerticalAlignment="Center" Height="25">
<ProgressBar Foreground="GreenYellow" Name="PbStatus" Value="{Binding [email protected], Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Minimum="0" Maximum="100" Height="20" VerticalAlignment="Center" Margin="0,3,0,0" Width="165"/>
<TextBlock FontFamily="Segoe UI" LineHeight="25" FontWeight="Bold" Text="{Binding [email protected], Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left" Height="20" Width="165" VerticalAlignment="Center" Margin="0,4,0,0"/>
</Canvas>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
なMAC Xamarinは、このまたはこれに近いものを扱いますか?
listview、gridviewなどの一般的なコントロールはどうですか?それらは存在しており、バインディングと同じように機能していますか? 私の進行状況バーの仕組みは、ダウンロードプロセス中に更新されるXMLドキュメントがあることです。- "Progess"という名前の属性が完了パーセントで更新され、XAMLプログレスバーがその属性にバインドされ、進行状況を表示できます。私はMacのためにこれをやり直さなければならないだろうか? –
Chris
いくつかの同様のコントロールがありますが、Windowsのデスクトップコントロールと同じではありません。 – Jason
フィードバックに感謝します。私はこのアプリを開発するのに約16時間を費やしました。Xamarin Macで同じことをするのに200時間もかかると言う開発者がいます。私はそれがそれほど複雑になるとは信じられません。私はWindows/Mac/Android用のコードベースと、WebClient(XMLドキュメントとコントロールバインディング)を使用して開発したコードをダウンロードするためのiOSを開発しようとしています。これらの4つのプラットフォームにはかなり普遍的なようです。たとえば、プラットフォームに依存しないAPIはありません。私はちょっと立ち往生ですか?私はこの時点で推測する。 – Chris