Files
BeWoPlaner/BeWo/View/Controls/DPCtrlSollIst.cs

62 lines
2.0 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace BeWo.View.Controls
{
public class DPCtrlSollIst : DienstplanerControl
{
public static readonly DependencyProperty SollIstInformationProperty = DependencyProperty.Register(
"SollIstInformation",
typeof(DPCtrlSollIstInformation),
typeof(DPCtrlSollIst),
new UIPropertyMetadata(
(s, e) =>
{
var information = (DPCtrlSollIstInformation)e.NewValue;
var ctrl = (DPCtrlSollIst)s;
if(ctrl != null)
{
if(information != null)
{
if (information.Row == 2)
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 0, 1);
else
{
if (information.Statuszeile)
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 0, 2);
else
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 0, 0);
}
}
}
}));
public DPCtrlSollIst()
{
InitializeComponent();
//BorderBlack.BorderThickness = new Thickness(0, 0, 1, 1);
FontSize = 12;
txt.HorizontalAlignment = HorizontalAlignment.Right;
}
public DPCtrlSollIstInformation SollIstInformation
{
get { return (DPCtrlSollIstInformation)GetValue(SollIstInformationProperty); }
set { SetValue(SollIstInformationProperty, value); }
}
}
public class DPCtrlSollIstInformation
{
public int Row { get; set; }
public bool Statuszeile { get; set; }
}
}