Создание пользовательского элемента управления
<UserControl x:Class="GroceryPriceTracker.Controls.NumberBoxControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:GroceryPriceTracker.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">
<UserControl.Resources>
<x:Double x:Key="CWidth">35</x:Double>
</UserControl.Resources>
<Grid Height="{StaticResource CWidth}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="40"></ColumnDefinition>
<ColumnDefinition Width="40"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBox InputScope="Number" BorderThickness="1"
Loaded="TextBox_Loaded"
Padding="10,6,10,0"
Height="35"
Style="{StaticResource TextBoxStyleBlack}"></TextBox>
<Grid Grid.Column="1"
BorderBrush="{ThemeResource InkToolbarAccentColorThemeBrush}"
BorderThickness="1"
Width="{StaticResource CWidth}"
Height="{StaticResource CWidth}">
<Button Width="{StaticResource CWidth}"
Height="{StaticResource CWidth}"
Grid.Column="1"
BorderThickness="0"
Background="Transparent">
<FontIcon FontSize="17"
FontFamily="Segoe MDL2 Assets"
Glyph="" />
</Button>
</Grid>
<Grid Grid.Column="2"
Margin="-5,0,0,0"
BorderBrush="{ThemeResource InkToolbarAccentColorThemeBrush}"
BorderThickness="1"
Width="{StaticResource CWidth}"
Height="{StaticResource CWidth}">
<Button Width="{StaticResource CWidth}"
Height="{StaticResource CWidth}"
BorderThickness="0"
Background="Transparent"
Grid.Column="2">
<FontIcon FontSize="17"
FontFamily="Segoe MDL2 Assets"
Glyph="" />
</Button>
</Grid>
</Grid>
</UserControl>