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
class EventToCommand | |
{ | |
public: | |
static const DependencyProperty* CommandProperty; | |
static ICommand* GetCommand(const DependencyObject* obj) | |
{ | |
NS_ASSERT(obj != 0); | |
auto command = obj->GetValue<Ptr<BaseComponent> >(CommandProperty); | |
return NsDynamicCast<ICommand*>(command.GetPtr()); |
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
struct EventBindingExtension: public BaseComponent, public IMarkupExtension | |
{ | |
EventBindingExtension() { } | |
const NsChar* GetCommandName() const { return commandName.c_str(); } | |
void SetCommandName(const NsChar* name) { commandName = name; } | |
Ptr<BaseComponent> ProvideValue(const void* context) override | |
{ | |
auto provider = (const XamlReaderProvider*)context; |
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
<Grid | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | |
<Grid HorizontalAlignment="Center" VerticalAlignment="Center"> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition/> | |
<ColumnDefinition Width="Auto"/> | |
</Grid.ColumnDefinitions> | |
<StackPanel Grid.Row="0"> | |
<StackPanel.Triggers> |
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
<Grid | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | |
<Grid HorizontalAlignment="Center" VerticalAlignment="Center"> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition/> | |
<ColumnDefinition Width="Auto"/> | |
</Grid.ColumnDefinitions> | |
<Grid.RowDefinitions> | |
<RowDefinition/> |
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
<Grid | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" | |
xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" | |
xmlns:noesis="clr-namespace:NoesisGUIExtensions;assembly=Noesis.GUI.Extensions"> | |
<Grid HorizontalAlignment="Center" VerticalAlignment="Center"> | |
<Viewbox StretchDirection="DownOnly"> | |
<Viewbox Width="400"> | |
<StackPanel HorizontalAlignment="Center"> |
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
<Grid | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | |
<Grid HorizontalAlignment="Center" VerticalAlignment="Center" Background="LightGray" TextElement.Foreground="Black"> | |
<Grid.Resources> | |
<LinearGradientBrush x:Key="BgBrush" StartPoint="0,0" EndPoint="1,1"> | |
<GradientStop Offset="0" Color="#FF9BDEFF"/> | |
<GradientStop Offset="1" Color="#FF69B5FF"/> | |
</LinearGradientBrush> | |
<Style x:Key="BorderStyle" TargetType="Border"> |
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
<Grid | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | |
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"> | |
<Button Padding="0"> | |
<Grid> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition Width="Auto"/> | |
<ColumnDefinition Width="*"/> | |
</Grid.ColumnDefinitions> |
OlderNewer