コード例 #1
0
ファイル: Layout.cs プロジェクト: punker76/OmniGUI
 protected Layout()
 {
     Children = new OwnedList <Layout>(this);
     Children.OnChildAdded(layout =>
     {
         layout.DataContext = DataContext;
         this.GetChangedObservable(DataContextProperty).Subscribe(o => layout.DataContext = o);
     });
     Pointer  = new PointerEvents(this, Platform.Current.EventDriver);
     Keyboard = new KeyboardEvents(this, Platform.Current.EventDriver, Platform.Current.FocusedElement);
 }
コード例 #2
0
ファイル: Layout.cs プロジェクト: robertmuehsig/OmniGUI
        protected Layout(Platform platform)
        {
            Platform = platform;

            Children = new OwnedList <Layout>(this);
            Children.OnChildAdded(layout =>
            {
                layout.DataContext = DataContext;
                GetChangedObservable(DataContextProperty).Subscribe(o => layout.DataContext = o);
            });

            Pointer  = new PointerEvents(this, Platform.EventSource);
            Keyboard = new KeyboardEvents(this, Platform.EventSource, Platform.RenderSurface.FocusedElement);
            Style    = this.GetType().Name;
            this.NotifyRenderAffectedBy(BackgroundProperty, ForegroundProperty);
        }
コード例 #3
0
ファイル: Layout.cs プロジェクト: knocte/OmniGUI
        protected Layout(IPropertyEngine propertyEngine)
        {
            PropertyEngine = propertyEngine;

            RegistrationGuard.RegisterFor <Layout>(() =>
            {
                DataContextProperty = DataContextProperty = PropertyEngine.RegisterProperty("DataContext", typeof(Layout), typeof(object), new PropertyMetadata());
            });

            Children = new OwnedList <Layout>(this);
            Children.OnChildAdded(layout =>
            {
                layout.DataContext = DataContext;
                GetChangedObservable(DataContextProperty).Subscribe(o => layout.DataContext = o);
            });
            Pointer  = new PointerEvents(this, Platform.Current.EventSource);
            Keyboard = new KeyboardEvents(this, Platform.Current.EventSource, Platform.Current.FocusedElement);
        }