protected override void OnTemplateApplied(TemplateAppliedEventArgs e) { _underline = e.NameScope.Find <Underline>(PART_Underline); _contentSite = e.NameScope.Find <ContentControlEx>(PART_ContentSite); Grid grid = e.NameScope.Find <Grid>(Part_ContentGrid); _leftColumn = grid.ColumnDefinitions.OfType <ColumnDefinitionExt>().FirstOrDefault(x => x.Name == PART_ContentLeftCol); _rightColumn = grid.ColumnDefinitions.OfType <ColumnDefinitionExt>().FirstOrDefault(x => x.Name == PART_ContentRightCol); //_leftColumn = e.NameScope.Find<ColumnDefinitionExt>(PART_ContentLeftCol); //_rightColumn = e.NameScope.Find<ColumnDefinitionExt>(PART_ContentRightCol); _bottomRow = grid.RowDefinitions.OfType <RowDefinitionExt>().FirstOrDefault(x => x.Name == PART_ContentBottomRow); //_bottomRow = e.NameScope.Find<RowDefinitionExt>(PART_ContentBottomRow); _topRow = grid.RowDefinitions.OfType <RowDefinitionExt>().FirstOrDefault(x => x.Name == PART_ContentTopRow); //_topRow = e.NameScope.Find<RowDefinitionExt>(PART_ContentTopRow); _isTemplateApplied = true; base.OnTemplateApplied(e); }
private void ApplyBorderProperties(Underline o, AvaloniaPropertyChangedEventArgs e) { o.ApplyBorderProperties(); }