Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
76 changes: 76 additions & 0 deletions MUXControls.sln

Large diffs are not rendered by default.

148 changes: 148 additions & 0 deletions dev/Generated/FlexboxLayout.properties.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

// DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
#include "pch.h"
#include "common.h"
#include "FlexboxLayout.h"

namespace winrt::Microsoft::UI::Xaml::Controls
{
CppWinRTActivatableClassWithDPFactory(FlexboxLayout)
}

#include "FlexboxLayout.g.cpp"

GlobalDependencyProperty FlexboxLayoutProperties::s_AlignSelfProperty{ nullptr };
GlobalDependencyProperty FlexboxLayoutProperties::s_BasisProperty{ nullptr };
GlobalDependencyProperty FlexboxLayoutProperties::s_GrowProperty{ nullptr };
GlobalDependencyProperty FlexboxLayoutProperties::s_OrderProperty{ nullptr };
GlobalDependencyProperty FlexboxLayoutProperties::s_ShrinkProperty{ nullptr };

FlexboxLayoutProperties::FlexboxLayoutProperties()
{
EnsureProperties();
}

void FlexboxLayoutProperties::EnsureProperties()
{
if (!s_AlignSelfProperty)
{
s_AlignSelfProperty =
InitializeDependencyProperty(
L"AlignSelf",
winrt::name_of<winrt::FlexboxAlignSelf>(),
winrt::name_of<winrt::FlexboxLayout>(),
true /* isAttached */,
ValueHelper<winrt::FlexboxAlignSelf>::BoxedDefaultValue(),
&FlexboxLayout::OnChildPropertyChanged);
}
if (!s_BasisProperty)
{
s_BasisProperty =
InitializeDependencyProperty(
L"Basis",
winrt::name_of<double>(),
winrt::name_of<winrt::FlexboxLayout>(),
true /* isAttached */,
ValueHelper<double>::BoxedDefaultValue(),
&FlexboxLayout::OnChildPropertyChanged);
}
if (!s_GrowProperty)
{
s_GrowProperty =
InitializeDependencyProperty(
L"Grow",
winrt::name_of<double>(),
winrt::name_of<winrt::FlexboxLayout>(),
true /* isAttached */,
ValueHelper<double>::BoxedDefaultValue(),
&FlexboxLayout::OnChildPropertyChanged);
}
if (!s_OrderProperty)
{
s_OrderProperty =
InitializeDependencyProperty(
L"Order",
winrt::name_of<int>(),
winrt::name_of<winrt::FlexboxLayout>(),
true /* isAttached */,
ValueHelper<int>::BoxedDefaultValue(),
&FlexboxLayout::OnChildPropertyChanged);
}
if (!s_ShrinkProperty)
{
s_ShrinkProperty =
InitializeDependencyProperty(
L"Shrink",
winrt::name_of<double>(),
winrt::name_of<winrt::FlexboxLayout>(),
true /* isAttached */,
ValueHelper<double>::BoxedDefaultValue(),
&FlexboxLayout::OnChildPropertyChanged);
}
}

void FlexboxLayoutProperties::ClearProperties()
{
s_AlignSelfProperty = nullptr;
s_BasisProperty = nullptr;
s_GrowProperty = nullptr;
s_OrderProperty = nullptr;
s_ShrinkProperty = nullptr;
}


void FlexboxLayoutProperties::SetAlignSelf(winrt::UIElement const& target, winrt::FlexboxAlignSelf const& value)
{
target.SetValue(s_AlignSelfProperty, ValueHelper<winrt::FlexboxAlignSelf>::BoxValueIfNecessary(value));
}

winrt::FlexboxAlignSelf FlexboxLayoutProperties::GetAlignSelf(winrt::UIElement const& target)
{
return ValueHelper<winrt::FlexboxAlignSelf>::CastOrUnbox(target.GetValue(s_AlignSelfProperty));
}


void FlexboxLayoutProperties::SetBasis(winrt::UIElement const& target, double value)
{
target.SetValue(s_BasisProperty, ValueHelper<double>::BoxValueIfNecessary(value));
}

double FlexboxLayoutProperties::GetBasis(winrt::UIElement const& target)
{
return ValueHelper<double>::CastOrUnbox(target.GetValue(s_BasisProperty));
}


void FlexboxLayoutProperties::SetGrow(winrt::UIElement const& target, double value)
{
target.SetValue(s_GrowProperty, ValueHelper<double>::BoxValueIfNecessary(value));
}

double FlexboxLayoutProperties::GetGrow(winrt::UIElement const& target)
{
return ValueHelper<double>::CastOrUnbox(target.GetValue(s_GrowProperty));
}


void FlexboxLayoutProperties::SetOrder(winrt::UIElement const& target, int value)
{
target.SetValue(s_OrderProperty, ValueHelper<int>::BoxValueIfNecessary(value));
}

int FlexboxLayoutProperties::GetOrder(winrt::UIElement const& target)
{
return ValueHelper<int>::CastOrUnbox(target.GetValue(s_OrderProperty));
}


void FlexboxLayoutProperties::SetShrink(winrt::UIElement const& target, double value)
{
target.SetValue(s_ShrinkProperty, ValueHelper<double>::BoxValueIfNecessary(value));
}

double FlexboxLayoutProperties::GetShrink(winrt::UIElement const& target)
{
return ValueHelper<double>::CastOrUnbox(target.GetValue(s_ShrinkProperty));
}
41 changes: 41 additions & 0 deletions dev/Generated/FlexboxLayout.properties.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

// DO NOT EDIT! This file was generated by CustomTasks.DependencyPropertyCodeGen
#pragma once

class FlexboxLayoutProperties
{
public:
FlexboxLayoutProperties();

static void SetAlignSelf(winrt::UIElement const& target, winrt::FlexboxAlignSelf const& value);
static winrt::FlexboxAlignSelf GetAlignSelf(winrt::UIElement const& target);

static void SetBasis(winrt::UIElement const& target, double value);
static double GetBasis(winrt::UIElement const& target);

static void SetGrow(winrt::UIElement const& target, double value);
static double GetGrow(winrt::UIElement const& target);

static void SetOrder(winrt::UIElement const& target, int value);
static int GetOrder(winrt::UIElement const& target);

static void SetShrink(winrt::UIElement const& target, double value);
static double GetShrink(winrt::UIElement const& target);

static winrt::DependencyProperty AlignSelfProperty() { return s_AlignSelfProperty; }
static winrt::DependencyProperty BasisProperty() { return s_BasisProperty; }
static winrt::DependencyProperty GrowProperty() { return s_GrowProperty; }
static winrt::DependencyProperty OrderProperty() { return s_OrderProperty; }
static winrt::DependencyProperty ShrinkProperty() { return s_ShrinkProperty; }

static GlobalDependencyProperty s_AlignSelfProperty;
static GlobalDependencyProperty s_BasisProperty;
static GlobalDependencyProperty s_GrowProperty;
static GlobalDependencyProperty s_OrderProperty;
static GlobalDependencyProperty s_ShrinkProperty;

static void EnsureProperties();
static void ClearProperties();
};
Loading