<Style TargetType="Window" x:Key="NeoWindow">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Window">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Menu Name="mainMenu" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Top">
<MenuItem Header="sadf"/>
</Menu>
<TabControl Name="tabList" Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
</TabControl>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Window x:Class="WpfApplication2.NeoWindow" Style="{StaticResource NeoWindow}"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="NeoWindow" Height="300" Width="300" Loaded="Window_Loaded">
<Grid>
</Grid>
</Window>
<controls:NeoWindow x:Class="WpfApplication4.Window1"
Вот проект в котором ваш шаблон работает: https://www.dropbox.com/s/9afajtydaab2pzj/WpfAppli... class Program
{
static void Main(string[] args)
{
Console.WriteLine("1)\t");
M("это строка", 1, 'R',false);
Console.WriteLine("2)\t");
M(false,'R',"это строка", 1 );
Console.WriteLine("3)\t");
M(new TestClass());
Console.ReadLine();
}
public static void M(params object[] list)
{
for (int i = 0; i < list.Length; i++)
{
Console.Write(list[i].GetType().Name + " ");
}
Console.WriteLine();
}
}
class TestClass
{
}
public partial class Column
{
public int Id { get; set; }
public string Name { get; set; }
public string CodeName { get; set; }
public ICollection<DataWorkBook_Column> Workbooks { get; set; }
}
public partial class DataWorkBook
{
public int Id { get; set; }
public string Name { get; set; }
public int Type { get; set; }
public ICollection<DataWorkBook_Column> Columns { get; set; }
}
public class DataWorkBook_Column
{
public Column Column {get;set;}
public DataWorkBook WorkBook {get;set;}
[Key]
public int ColumnIndex {get;set;}
}
public static string Back(string input)
{
StringBuilder result = new StringBuilder();
var sp = input.Split(' ');
List<byte> bytes = new List<byte>();
for (int i = 0; i < sp.Length; i++)
{
if (String.IsNullOrWhiteSpace(sp[i])) continue;
bytes.Add( byte.Parse(sp[i], System.Globalization.NumberStyles.AllowHexSpecifier));
}
var bytemas = bytes.ToArray();
for (int i = 0; i < bytemas.Length;i+=2 )
{
result.Append(BitConverter.ToChar(bytemas,i));
}
return result.ToString();
}