全国建设市场公共服务网站,竞价恶意点击犯法吗,国际4a广告公司排名,广州手表网站前面一篇效果基于Expander和ListBox实现了一下所需要的效果;今天再次实现点底部不一样的效果;最终实现的效果:1、ItemContainerStyle我是比较简单粗暴直接分了二行:ListBoxCanvas实现:ControlTemplate TargetType{x:Type ListBoxItem}Grid Background今天再次实现点底部不一样的效果;最终实现的效果:1、ItemContainerStyle我是比较简单粗暴直接分了二行:ListBoxCanvas实现:ControlTemplate TargetType{x:Type ListBoxItem}Grid Background#18191B Margin0 HorizontalAlignmentStretch VerticalAlignmentStretchGrid.RowDefinitionsRowDefinition/RowDefinition Height80//Grid.RowDefinitionsListBox Style{StaticResource SignalCardListBox} NameSignalCardListBox ItemsSource{Binding SignalDistributionCards}/Canvas Grid.Row1 Width{Binding ElementNameSignalCardListBox,PathActualWidth}Border Canvas.Left{Binding LeftCardCount,Converter{StaticResource LeftCardCountToVideoCardLeft}} Canvas.Top30 BorderBrushGreen HorizontalAlignmentCenter VerticalAlignmentBottom BorderThickness2 Padding0 Width150 Height40CheckBox Margin4,0,0,0 Content视频接入卡Style{StaticResource CheckCheckBoxStyle}IsChecked{Binding IsChecked}//BorderPath DataM13.170958,0L14.585027,1.4149784 3.8476841,12.144024 32.000095,12.144024 32.000095,14.145017 3.8188674,14.145017 14.607,24.922982 13.191954,26.338998 0,13.159001zStretchFill FillWhite Height26 Width50 RenderTransformOrigin0.5,0.5Canvas.Left{Binding LeftCardCount,Converter{StaticResource LeftCardCountToVideoCardLeftArrowValue}}Path.RenderTransformRotateTransform Angle45//Path.RenderTransform/PathPath DataM13.170958,0L14.585027,1.4149784 3.8476841,12.144024 32.000095,12.144024 32.000095,14.145017 3.8188674,14.145017 14.607,24.922982 13.191954,26.338998 0,13.159001zStretchFill FillWhite Height26 Width49 RenderTransformOrigin0.5,0.5Canvas.Left{Binding LeftCardCount,Converter{StaticResource LeftCardCountToVideoCardRightArrowValue}}Path.RenderTransformRotateTransform Angle135//Path.RenderTransform/Path/Canvas/Grid
/ControlTemplate2、左侧箭头Canvas.Left的转换器:public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{double leftValue 0.0;if(value ! null){//左侧带载的信号分配卡的数量int count System.Convert.ToInt32(value);if(count ! 0){//单个信号分配卡的宽度是200所以有几个就要乘以几个在减去左侧箭头的宽度(50)leftValue count * 200 - 50;}}return leftValue;
}3、右侧箭头Canvas.Left的转换器public object Convert(object value, Type targetType, object parameter, CultureInfo culture){double leftValue 0.0;if(value ! null){//左侧带载的信号分配卡的数量int count System.Convert.ToInt32(value);if(count ! 0){//单个信号分配卡的宽度是200所以有几个就要乘以几个leftValue count * 200;}}return leftValue;}最终简单的效果先这样吧;以后有时间的话,可以再去摸索一下更复杂的效果;编程不息、Bug不止、无Bug、无生活;改bug的冷静、编码的激情、完成后的喜悦、挖坑的激动 、填坑的兴奋;这也许就是屌丝程序员的乐趣吧;今天就到这里吧;希望自己有动力一步一步坚持下去;生命不息,代码不止;大家抽空可以看看今天分享的效果,有好的意见和想法,可以在留言板随意留言;我看到后会第一时间回复大家,多谢大家的一直默默的关注和支持!如果觉得不错,那就伸出您的小手点个赞并关注一下