-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extract QueryEditor as a separate component
- Loading branch information
Showing
6 changed files
with
231 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
sources/RevitDBExplorer/UIComponents/QueryEditor/QueryEditorView.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<UserControl x:Class="RevitDBExplorer.UIComponents.QueryEditor.QueryEditorView" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:RevitDBExplorer.UIComponents.QueryEditor" | ||
xmlns:wpf="clr-namespace:RevitDBExplorer.WPF" | ||
xmlns:controls="clr-namespace:RevitDBExplorer.WPF.Controls" | ||
mc:Ignorable="d" | ||
d:DesignHeight="450" d:DesignWidth="800"> | ||
<UserControl.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<ResourceDictionary Source="../../Resources/Templates/All.xaml"/> | ||
<wpf:ThemeResourceDictionary Name="Colors"/> | ||
<ResourceDictionary Source="../../Resources/VectorGraphic.xaml"/> | ||
</ResourceDictionary.MergedDictionaries> | ||
|
||
</ResourceDictionary> | ||
</UserControl.Resources> | ||
|
||
<Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" Margin="0 3 0 3" > | ||
<Grid.RowDefinitions> | ||
<RowDefinition/> | ||
</Grid.RowDefinitions> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition/> | ||
<ColumnDefinition Width="auto"/> | ||
<ColumnDefinition Width="auto"/> | ||
</Grid.ColumnDefinitions> | ||
|
||
<controls:TextBoxWithPlaceholder Text="{Binding DatabaseQuery, Mode=TwoWay, Delay=1000, UpdateSourceTrigger=PropertyChanged}" | ||
AutocompleteItemProvider="{Binding DatabaseQueryAutocompleteItemProvider}" | ||
IsPopupOpen="{Binding IsPopupOpen}" | ||
Placeholder="Query Revit database with RDQ"> | ||
<!--ToolTip="{Binding DatabaseQueryToolTip}" | ||
ToolTipService.ShowDuration="50000"--> | ||
|
||
<!--<controls:TextBoxWithPlaceholder.ContextMenu> | ||
<ContextMenu> | ||
<MenuItem Command="ApplicationCommands.Copy" /> | ||
<MenuItem Command="ApplicationCommands.Cut" /> | ||
<MenuItem Command="ApplicationCommands.Paste" /> | ||
<Separator/> | ||
<MenuItem Header ="Copy generated C# syntax" Tag="Default" Click="TextBox_MenuItem_CopyFilteredElementCollector"/> | ||
</ContextMenu> | ||
</controls:TextBoxWithPlaceholder.ContextMenu>--> | ||
</controls:TextBoxWithPlaceholder> | ||
|
||
<Button Grid.Column="1" BorderBrush="Transparent" Margin="2 0 0 0" MinWidth="21" MinHeight="21" Padding="2 0 1 1" ToolTip="Save query as favorite" Background="Transparent" Command="{Binding SaveQueryAsFavoriteCommand}"> | ||
<Path Style="{StaticResource IconFavorite}" Width="18"/> | ||
</Button> | ||
|
||
<Button Grid.Column="2" BorderBrush="Transparent" Margin="2 0 0 0" MinWidth="21" MinHeight="21" Padding="2 0 1 1" ToolTip="Generate C# code for this SELECT query (RDS)" Background="Transparent" Command="{Binding OpenScriptingWithQueryCommand}"> | ||
<Path Style="{StaticResource IconQuery}" Width="12" /> | ||
</Button> | ||
</Grid> | ||
</UserControl> |
Oops, something went wrong.