Beispiel #1
0
 public override void AssignProperties(ISharpRenderer <global::System.Windows.UIElement> renderer, int level, NewState newState, TProps previous, TProps nextProps)
 {
     base.AssignProperties(renderer, level, newState, previous, nextProps);
     if (nextProps.RecognizesAccessKey.HasValue)
     {
         Element.RecognizesAccessKey = nextProps.RecognizesAccessKey.Value.Value;
     }
     if (nextProps.Content != null)
     {
         Element.Content = renderer.ProcessPair(level + 1, newState, previous?.Content, nextProps.Content);
     }
     if (nextProps.ContentTemplate.HasValue)
     {
         Element.ContentTemplate = nextProps.ContentTemplate.Value.Value;
     }
     if (nextProps.ContentTemplateSelector.HasValue)
     {
         Element.ContentTemplateSelector = nextProps.ContentTemplateSelector.Value.Value;
     }
     if (nextProps.ContentStringFormat.HasValue)
     {
         Element.ContentStringFormat = nextProps.ContentStringFormat.Value.Value;
     }
     if (nextProps.ContentSource.HasValue)
     {
         Element.ContentSource = nextProps.ContentSource.Value.Value;
     }
 }
 public override void AssignProperties(ISharpRenderer <Elements.UIElement> renderer, int level, NewState newState, TProps previous, TProps nextProps)
 {
     base.AssignProperties(renderer, level, newState, previous, nextProps);
     if (nextProps.Content != null)
     {
         Element.Content = renderer.ProcessPair(level + 1, newState, previous?.Content, nextProps.Content);
     }
 }
Beispiel #3
0
 public override void AssignProperties(ISharpRenderer <global::System.Windows.UIElement> renderer, int level, NewState newState, TProps previous, TProps nextProps)
 {
     base.AssignProperties(renderer, level, newState, previous, nextProps);
     if (nextProps.Content != null)
     {
         Element.Content = renderer.ProcessPair(level + 1, newState, previous?.Content, nextProps.Content);
     }
     if (nextProps.WindowTitle.HasValue)
     {
         Element.WindowTitle = nextProps.WindowTitle.Value.Value;
     }
     if (nextProps.WindowHeight.HasValue)
     {
         Element.WindowHeight = nextProps.WindowHeight.Value.Value;
     }
     if (nextProps.WindowWidth.HasValue)
     {
         Element.WindowWidth = nextProps.WindowWidth.Value.Value;
     }
     if (nextProps.Background.HasValue)
     {
         Element.Background = nextProps.Background.Value.Value;
     }
     if (nextProps.Title.HasValue)
     {
         Element.Title = nextProps.Title.Value.Value;
     }
     if (nextProps.ShowsNavigationUI.HasValue)
     {
         Element.ShowsNavigationUI = nextProps.ShowsNavigationUI.Value.Value;
     }
     if (nextProps.KeepAlive.HasValue)
     {
         Element.KeepAlive = nextProps.KeepAlive.Value.Value;
     }
     if (nextProps.Foreground.HasValue)
     {
         Element.Foreground = nextProps.Foreground.Value.Value;
     }
     if (nextProps.FontFamily.HasValue)
     {
         Element.FontFamily = nextProps.FontFamily.Value.Value;
     }
     if (nextProps.FontSize.HasValue)
     {
         Element.FontSize = nextProps.FontSize.Value.Value;
     }
     if (nextProps.Template.HasValue)
     {
         Element.Template = nextProps.Template.Value.Value;
     }
 }
Beispiel #4
0
        public override View GetView(int position, View convertView, ViewGroup parent)
        {
            var prop = items[position];

            if (convertView == null)
            {
                convertView = renderer.ProcessPair(0, NewState.Empty, null, prop);
            }
            else
            {
                renderer.RemoveElement(convertView, prop);
                renderer.UpdateExistingElement(convertView, prop);
            }
            return(convertView);
        }
Beispiel #5
0
        public Elements.UIElement GetView(int position, Elements.UIElement convertView)
        {
            var prop = items[position];

            if (convertView == null)
            {
                convertView = renderer.ProcessPair(0, NewState.Empty, null, prop);
            }
            else
            {
                renderer.RemoveElement(convertView, prop);
                renderer.UpdateExistingElement(convertView, prop);
            }
            return(convertView);
        }