Skip to content

Latest commit

 

History

History
94 lines (81 loc) · 4.56 KB

README.md

File metadata and controls

94 lines (81 loc) · 4.56 KB

AntWpf

A UI framework using ant design language to help developers build their own WPF applications.

Under development, not suitable for production environment

GETTING STARTED

<Application ...>
  <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/AntWpf;component/Styles/Theme.xaml" />
                <ResourceDictionary Source="pack://application:,,,/AntWpf;component/Styles/Controls.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

Buttons

Buttons

    xmlns:Ant="clr-namespace:AntWpf.Controls;assembly=AntWpf"

    <WrapPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
        <Ant:Button Type="Primary" Margin="10,0" Content="Button1"/>
        <Ant:Button Type="Primary" Shape="Circle" Icon="search" Margin="10,0" />
        <Ant:Button Type="Dashed" Margin="10,0" Content="Button2"/>
        <Ant:Button Type="Danger" Margin="10,0" Content="Button3"/>
        <Ant:Button Type="Primary" Margin="10,10" Loading="True" Content="Loading"/>
        <Ant:Button Type="Primary" Shape="Circle"  Margin="10,10" Loading="True" />
    </WrapPanel>

Inputs

Inputs

    xmlns:Ant="clr-namespace:AntWpf.Controls;assembly=AntWpf"

    <StackPanel Grid.Row="1" VerticalAlignment="Center" MinWidth="300"  HorizontalAlignment="Center">
      <TextBox Ant:Input.Placeholder="Place holder" Margin="0,10"/>
      <PasswordBox Ant:Input.Placeholder="PassworBox" Ant:Input.Eyeable="True"/>
      <ComboBox Margin="0,10" >
       <ComboBoxItem Content="Itemm 1"/>
       <ComboBoxItem Content="Itemm 3"/>
       <ComboBoxItem Content="Itemm 4"/>
     </ComboBox>
    </StackPanel>

CheckBoxes & RadioButtons

Inputs

  <StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" MinWidth="300"  HorizontalAlignment="Center">
    <CheckBox Margin="5,0" Content="Checked" IsChecked="True"/>
    <CheckBox Margin="5,0" Content="UnChecked"/>
    <CheckBox Margin="5,0" Content="Disabled" IsEnabled="False"/>
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" MinWidth="300" Margin="0,12" HorizontalAlignment="Center">
    <Ant:Switch Margin="5,0" UnCheckedContent="0" Content="1" IsChecked="True"/>
    <Ant:Switch Margin="5,0" UnCheckedContent="UnChecked" IsChecked="True" Content="Checked"/>
    <Ant:Switch Margin="5,0" IsEnabled="False"/>
    <Ant:Switch Margin="5,0"  IsChecked="True"  Loading="True"/>
</StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" MinWidth="300" Margin="0,12" HorizontalAlignment="Center">
    <RadioButton Margin="5,0" GroupName="0" Content="Checked" IsChecked="True"/>
    <RadioButton Margin="5,0" GroupName="0" Content="UnChecked" />
    <RadioButton Margin="5,0" GroupName="0" Content="Disabled" IsEnabled="False" />
</StackPanel>

ProgressBars

Inputs

 <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
    <ProgressBar Ant:ProgressAssist.SmoothValue="{Binding ElementName=sld, Path=Value}" Margin="12,0" Maximum="100" BorderThickness="8" Minimum="0"  Width="67" Style="{StaticResource Ant.CircularProgressBar}"/>
    <ProgressBar  Value="100"  Margin="12,0" Maximum="100" BorderThickness="8" Minimum="0"  Width="67" Style="{StaticResource Ant.CircularProgressBar}"/>
 </StackPanel>
 <ProgressBar Ant:ProgressAssist.SmoothValue="{Binding ElementName=sld, Path=Value}"   Margin="0,24,0,12"  Maximum="100" IsIndeterminate="False"  Minimum="0"  Width="300" />
 <ProgressBar Value="100"  Maximum="100" IsIndeterminate="False"  Minimum="0"  Width="300" />

Icons

Inputs

  <Ant:AntIcon Key="AntCloudOutlined" Margin="4" Height="32" HorizontalAlignment="Center" Width="32"/>

AntDesign AntDesign