mirror of
https://github.com/Blinue/Magpie.git
synced 2026-06-24 02:04:10 +00:00
59 lines
1.6 KiB
C++
59 lines
1.6 KiB
C++
#pragma once
|
|
|
|
#include "pch.h"
|
|
#include "SettingItem.g.h"
|
|
|
|
|
|
namespace winrt::Magpie::App::implementation {
|
|
|
|
struct SettingItem : SettingItemT<SettingItem> {
|
|
SettingItem();
|
|
|
|
void Title(const hstring& value);
|
|
|
|
hstring Title() const;
|
|
|
|
void Description(IInspectable value);
|
|
|
|
IInspectable Description() const;
|
|
|
|
void Icon(IInspectable value);
|
|
|
|
IInspectable Icon() const;
|
|
|
|
void ActionContent(IInspectable value);
|
|
|
|
IInspectable ActionContent() const;
|
|
|
|
void IsEnabledChanged(IInspectable const&, DependencyPropertyChangedEventArgs const&);
|
|
void Loading(FrameworkElement const&, IInspectable const&);
|
|
|
|
event_token PropertyChanged(Data::PropertyChangedEventHandler const& value);
|
|
void PropertyChanged(event_token const& token);
|
|
|
|
static DependencyProperty TitleProperty;
|
|
static DependencyProperty DescriptionProperty;
|
|
static DependencyProperty IconProperty;
|
|
static DependencyProperty ActionContentProperty;
|
|
|
|
private:
|
|
static void _OnTitleChanged(DependencyObject const& sender, DependencyPropertyChangedEventArgs const&);
|
|
static void _OnDescriptionChanged(DependencyObject const& sender, DependencyPropertyChangedEventArgs const&);
|
|
static void _OnIconChanged(DependencyObject const& sender, DependencyPropertyChangedEventArgs const&);
|
|
static void _OnActionContentChanged(DependencyObject const& sender, DependencyPropertyChangedEventArgs const&);
|
|
|
|
void _Update();
|
|
|
|
void _SetEnabledState();
|
|
|
|
event<Data::PropertyChangedEventHandler> _propertyChangedEvent;
|
|
};
|
|
|
|
}
|
|
|
|
namespace winrt::Magpie::App::factory_implementation {
|
|
|
|
struct SettingItem : SettingItemT<SettingItem, implementation::SettingItem> {
|
|
};
|
|
|
|
}
|