本文整理汇总了C#中System.Windows.Window.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# Window.GetValue方法的具体用法?C# Window.GetValue怎么用?C# Window.GetValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Window
的用法示例。
在下文中一共展示了Window.GetValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DettachWindowListeners
private static void DettachWindowListeners(Window window, object vm) {
if(vm != null) {
var listener = (WindowMessageListener)window.GetValue(WindowMessageListenerProperty);
if(listener != null) {
window.SetValue(WindowMessageListenerProperty, null);
listener.Dettach(vm, window);
}
}
}
示例2: GetCanMaximize
public static bool GetCanMaximize(Window obj)
{
if (obj == null)
{
throw new ArgumentNullException("obj");
}
return (bool)obj.GetValue(CanMaximizeProperty);
}
示例3: EnsureHotkeyServiceHelper
private static HotkeyServiceHelper EnsureHotkeyServiceHelper(Window window)
{
HotkeyServiceHelper helper = (HotkeyServiceHelper)window.GetValue(HotkeyServiceHelperPropertyKey.DependencyProperty);
if (helper == null)
{
helper = new HotkeyServiceHelper(window);
window.SetValue(HotkeyServiceHelperPropertyKey, helper);
}
return helper;
}
示例4: _EnsureAttachedExtensions
private static WindowExtensions _EnsureAttachedExtensions(Window window)
{
Assert.IsNotNull(window);
var ext = (WindowExtensions)window.GetValue(WindowExtensionsProperty);
if (ext == null)
{
ext = new WindowExtensions(window);
window.SetValue(WindowExtensionsProperty, ext);
}
return ext;
}
示例5: FindFirstModalDialog
static Window FindFirstModalDialog(Window ownerWindow)
{
if (ownerWindow != null)
{
if (ownerWindow.OwnedWindows.Count != 0)
{
foreach (Window w in ownerWindow.OwnedWindows)
{
var window = FindFirstModalDialog(w);
if (window != null)
{
return window;
}
}
}
if ((bool)ownerWindow.GetValue(IsModalProperty) && ownerWindow.IsEnabled && ownerWindow.IsVisible && ownerWindow.IsActive)
{
return ownerWindow;
}
}
return null;
}
示例6: GetIsModalProperty
public static bool GetIsModalProperty(Window window)
{
return (bool)window.GetValue(IsModalProperty);
}
示例7: GetApplicationClosing
public static ApplicationExitingDelegate GetApplicationClosing(Window element)
{
return (ApplicationExitingDelegate)element.GetValue(ApplicationClosingProperty);
}
示例8: GetInstance
public static WindowChrome GetInstance(Window window)
{
return (WindowChrome)window.GetValue(InstanceProperty);
}
示例9: GetIsClosingAsPartOfDragOperation
public static bool GetIsClosingAsPartOfDragOperation(Window element)
{
return (bool) element.GetValue(IsClosingAsPartOfDragOperationProperty);
}
示例10: GetIsHiddenCloseButton
public static bool GetIsHiddenCloseButton(Window obj)
{
return (bool)obj.GetValue(IsHiddenCloseButtonProperty);
}
示例11: GetSettings
public static Settings GetSettings(Window element)
{
return (Settings)element.GetValue(SettingsProperty);
}
示例12: GetCurrentValidatedControl
private static FrameworkElement GetCurrentValidatedControl (Window d)
{
return (FrameworkElement)d.GetValue(CurrentValidatedControlProperty);
}
示例13: GetDialogResult
/// <summary>
/// Gets the DialogResult value from the specified target.
/// </summary>
/// <param name="target">The target.</param>
/// <returns>The value.</returns>
public static bool? GetDialogResult(Window target)
{
return (bool?)target.GetValue(DialogResultProperty);
}
示例14: GetTooltipPopup
private static TooltipPopup GetTooltipPopup (Window d)
{
return (TooltipPopup)d.GetValue(TooltipPopupProperty);
}
示例15: GetNadenade
/// <summary>添付プロパティから撫でた量を取得します。</summary>
/// <param name="target">取得元</param>
/// <returns>撫でた量</returns>
public static double GetNadenade(Window target)
{
return (double)target.GetValue(NadenadeProperty);
}