File tree 3 files changed +10
-2
lines changed
3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ namespace winrt::TerminalApp::implementation
117
117
// FilteredCommand() = default;
118
118
// FilteredCommand(const winrt::TerminalApp::PaletteItem& item);
119
119
120
- void UpdateFilter (const winrt::hstring& filter) override
120
+ void UpdateFilter (const winrt::hstring& filter) override
121
121
{
122
122
TerminalApp::implementation::FilteredCommand::UpdateFilter (filter);
123
123
for (const auto & c : _children)
@@ -150,9 +150,15 @@ namespace winrt::TerminalApp::implementation
150
150
};
151
151
winrt::Windows::Foundation::Collections::IObservableVector<TerminalApp::FilteredTask> Children () { return _children; }
152
152
153
+ winrt::Windows::UI::Xaml::Visibility Visibility ()
154
+ {
155
+ return (_Filter.empty () || _Weight > 0 ) ? winrt::Windows::UI::Xaml::Visibility::Visible : winrt::Windows::UI::Xaml::Visibility::Collapsed;
156
+ };
157
+
153
158
private:
154
159
winrt::Microsoft::Terminal::Settings::Model::Command _command{ nullptr };
155
160
winrt::Windows::Foundation::Collections::IObservableVector<TerminalApp::FilteredTask> _children{ nullptr };
161
+
156
162
};
157
163
}
158
164
Original file line number Diff line number Diff line change 33
33
<DataTemplate x : Key =" TaskItemTemplate"
34
34
x : DataType =" local:FilteredTask" >
35
35
<mux : TreeViewItem x : Name =" rootItem"
36
- ItemsSource =" {x:Bind Children}" >
36
+ ItemsSource =" {x:Bind Children}"
37
+ Visibility =" {x:Bind Visibility}" >
37
38
<Grid >
38
39
<Grid .RowDefinitions>
39
40
<RowDefinition Height =" *" />
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ namespace TerminalApp
43
43
{
44
44
String Input{ get; };
45
45
Windows.Foundation.Collections.IObservableVector<FilteredTask> Children { get; };
46
+ Windows.UI.Xaml.Visibility Visibility { get; };
46
47
}
47
48
48
49
[default_interface] runtimeclass TasksPaneContent : Windows.UI.Xaml.Controls.UserControl, IPaneContent
You can’t perform that action at this time.
0 commit comments