Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed/extended SubModelSelectedItem sample #614

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
.
  • Loading branch information
YkTru committed Sep 23, 2024
commit b449e8907636f0eba97cd1c0aadafc8ed7b38c12
11 changes: 7 additions & 4 deletions src/Samples/SubModelSelectedItem.Core/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ module App =
let addTextBox m =
let newTextBox = TextBox.create ()

let updatedTextBox = { newTextBox with Text = "#New# " + newTextBox.Text }
let updatedTextBox = { newTextBox with Text = "###New### --- " + newTextBox.Text }

let newComponent = TextBox updatedTextBox

Expand Down Expand Up @@ -196,7 +196,7 @@ module App =
let addCheckBox m =
let newCheckBox = CheckBox.create ()

let updatedCheckBox = { newCheckBox with Label = "#New# " + newCheckBox.Label }
let updatedCheckBox = { newCheckBox with Label = "###New### --- " + newCheckBox.Label }

let newComponent = CheckBox updatedCheckBox

Expand All @@ -223,6 +223,9 @@ module App =

let addComboBox m =
let newComboBox = ComboBox.create ()

let updateComboBox = { newComboBox with Header = "###New### --- " + newComboBox.Header }

let newComponent = ComboBox newComboBox

let components =
Expand All @@ -236,8 +239,8 @@ module App =
| None -> m.Components @ [ newComponent ]

let log =
("Added: " + newComboBox.Header)
:: ("Selected: " + newComboBox.Header)
("Added: " + updateComboBox.Header)
:: ("Selected: " + updateComboBox.Header)
:: logDashedLine :: m.Log

{ m with
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.fs" />
<Compile Include="FsWPF.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Serilog" Version="2.11.0" />
Expand Down
4 changes: 2 additions & 2 deletions src/Samples/SubModelSelectedItem/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Window
x:Class="Elmish.WPF.Samples.SubModelSelectedItem.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:Program;assembly=DTS_Simple.Core"
xmlns:vm="clr-namespace:Program;assembly=SubModelSelectedItem.Core"
Title="MainWindow"
d:DataContext="{d:DesignInstance Type=vm:App_VM,
IsDesignTimeCreatable=True}"
Expand Down
Loading