All Projects → stil → candyshop

stil / candyshop

Licence: MIT license
Themes/skins for Windows Presentation Foundation (WPF)

Programming Languages

C#
18002 projects

candyshop

Themes/skins for Windows Presentation Foundation (WPF)

Screenshot

something

Integration with your project

  1. Reference Candido in your project.
  2. In App.xaml under <Application.Resources> you need to add following code:
<ResourceDictionary>
  <ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="/Candido;component/Hybrid.xaml" />
  </ResourceDictionary.MergedDictionaries>
  
  <!-- Workaround for ResourceDictionary bug/optimization. Don't remove line below. -->
  <Style TargetType="{x:Type Rectangle}" />
</ResourceDictionary>

Note about windows

Styles will be applied to all controls except Windows. You need to apply Window style manually:

<Window Style="{StaticResource Hybrid.WindowTheme}">

Spacing property

Have you ever thought how to optimize following code?

<StackPanel>
  <Button Margin="0,0,0,10">Button 1</Button>
  <Button Margin="0,0,0,10">Button 2</Button>
  <Button Margin="0,0,0,10">Button 3</Button>
  <Button Margin="0">Button 4</Button>
</StackPanel>

You can do it as easy as:

<StackPanel xmlns:candido="clr-namespace:Candido;assembly=Candido" candido:Spacing.Vertical="10">
  <Button>Button 1</Button>
  <Button>Button 2</Button>
  <Button>Button 3</Button>
  <Button>Button 4</Button>
</StackPanel>

In this example it will automatically add bottom margin for all controls except last one. So the margin will be applied between controls. You can do the same with:

<StackPanel
  xmlns:candido="clr-namespace:Candido;assembly=Candido"
  candido:Spacing.Horizontal="10"
  Orientation="Horizontal">

In this case it will space items horizontally (set right margin except last control).

To keep it short, you can move xmlns declaration to parent element, for example:

<Window xmlns:candido="clr-namespace:Candido;assembly=Candido">
  <StackPanel candido:Spacing.Vertical="10">
    <Button>Button 1</Button>
    <Button>Button 2</Button>
    <Button>Button 3</Button>
    <Button>Button 4</Button>
  </StackPanel>
  <StackPanel candido:Spacing.Horizontal="10" Orientation="Horizontal">
    <Button>Button 1</Button>
    <Button>Button 2</Button>
  </StackPanel>
<Window>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].