Skip to content

Getting started with controls (Version before 5.0.0)

Simnico99 edited this page Mar 3, 2023 · 1 revision

Click here for version 5.0.0 and newer

Contents

  1. Usage
  2. Result
  3. Usage (Version 4.0 and Earlier)

Usage

  1. Add the 2 following ResourceDictionary to your App.xaml:
<Application
    x:Class="MicaWPF.Demo"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MicaWPF;component/Styles/Themes/MicaDark.xaml" /> <!-- Note you can change this one to MicaLight -->
                <ResourceDictionary Source="pack://application:,,,/MicaWPF;component/Styles/MicaWPF.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

2. To use the controls just add the following namespace to your Control (Window, Page, Etc)<br/>
```Xaml 
xmlns:controls="clr-namespace:MicaWP.Controls;assembly=MicaWPF"
  1. Here is an exemple of a Control (MicaTextBox)
<controls:TextBox Height="34" Watermark="Test01" />

Result:

image