RestAPI
1) Views/Shared/_Layout.cshtml 수정
2) Home/Index.cshtml 수정
RestAPI를 WPF에서 사용하기
1) WPF 애플리케이션으로 프로젝트 생성
2) 누겟 패키지 관리
- MahApps.Metro 설치 및 적용
https://mahapps.com/docs/guides/quick-start3) MainWindow.xaml 디자인
<mah:MetroWindow x:Class="TodoItemApp.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mah="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:TodoItemApp" mc:Ignorable="d" Title="TodoList" Height="450" Width="800" Loaded="MetroWindow_Loaded"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="3*"/> <ColumnDefinition Width="2*"/> </Grid.ColumnDefinitions> <DataGrid Grid.Column="0" x:Name="GrdTodoItems" Margin="10" Background="Gainsboro"></DataGrid> <Grid Grid.Column="1" Margin="20"> <Grid.RowDefinitions> <RowDefinition/> <RowDefinition/> <RowDefinition/> <RowDefinition/> <RowDefinition/> </Grid.RowDefinitions> <TextBox Grid.Row="0" x:Name="TxtId" mah:TextBoxHelper.AutoWatermark="True" mah:TextBoxHelper.Watermark="Id" FontSize="14" Margin="5"/> <TextBox Grid.Row="1" x:Name="TxtTitle" mah:TextBoxHelper.AutoWatermark="True" mah:TextBoxHelper.Watermark="Title" FontSize="14" Margin="5"/> <mah:DateTimePicker Grid.Row="2" x:Name="DtpTodoDate" mah:TextBoxHelper.AutoWatermark="True" mah:TextBoxHelper.Watermark="TodoDate" FontSize="14" Margin="5"/> <ComboBox Grid.Row="3" x:Name="CboIsComplete" FontSize="14" Margin="5" mah:TextBoxHelper.AutoWatermark="True" mah:TextBoxHelper.Watermark="IsComplete"/> <StackPanel Orientation="Horizontal" Grid.Row="4"> <Button x:Name="BtnInsert" Content="Insert" FontSize="14" Width="90" Margin="1,10"/> <Button x:Name="BtnUpdate" Content="Update" FontSize="14" Width="90" Margin="1,10"/> <Button x:Name="BtnDelete" Content="Delete" FontSize="14" Width="90" Margin="1,10"/> </StackPanel> </Grid> </Grid> </mah:MetroWindow>