示例#1
0
        static NativeMenuInfo GetInfo(TopLevel target)
        {
            var rv = target.GetValue(s_nativeMenuInfoProperty);

            if (rv == null)
            {
                target.SetValue(s_nativeMenuInfoProperty, rv = new NativeMenuInfo(target));
                SetIsNativeMenuExported(target, rv.Exporter?.IsNativeMenuExported ?? false);
            }

            return(rv);
        }
示例#2
0
 static void SetIsNativeMenuExported(TopLevel tl, bool value)
 {
     GetInfo(tl).ChangingIsExported = true;
     tl.SetValue(IsNativeMenuExportedProperty, value);
 }