.net-4.5

WPF WindowChrome: Edges of maximized Window are out of the screen

…衆ロ難τιáo~ 提交于 2020-06-22 08:34:25
问题 I use WindowChrome to customize a Window. When I maximize the Window, then the edges are out of the screen. I use the following code to fix this: <Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <WindowChrome.WindowChrome> <WindowChrome CaptionHeight="50" CornerRadius="0" GlassFrameThickness="0" NonClientFrameEdges="None" ResizeBorderThickness="5" UseAeroCaptionButtons="False"

Create a generic list in xaml 4.5+

╄→尐↘猪︶ㄣ 提交于 2020-04-13 17:17:15
问题 I am trying to make a rule list for one of my usercontrols. List contains a custom type List<StringInputRule> . I am using DependancyProperty to databind. I am trying to set the rules in xaml for the control as such: <controlsDefault:DateEditWithStringInput> <controlsDefault:DateEditWithStringInput.Rules> <x:Array Type="controlsDefault:StringInputRule" xmlns:sys="clr-namespace:System;assembly=mscorlib"> <controlsDefault:StringInputRule Key="T" Amount="1" Unit="Day"/> <controlsDefault

Maximum number of elements in an array vs. maximum indexer value

家住魔仙堡 提交于 2020-04-12 17:26:43
问题 today I started wondering about something in the MSDN. This article demonstrates, how one can increase the memory allocatable by an array under .NET 4.5 and x64. This is a nice feature, but something in the description provided by Microsoft baffeles me. Under the section "Remarks" they say, that: The maximum index in any single dimension is 2,147,483,591 (0x7FFFFFC7) for byte arrays and arrays of single-byte structures, and 2,146,435,071 (0X7FEFFFFF) for other types. Since I mainly have int[]

Maximum number of elements in an array vs. maximum indexer value

社会主义新天地 提交于 2020-04-12 17:25:58
问题 today I started wondering about something in the MSDN. This article demonstrates, how one can increase the memory allocatable by an array under .NET 4.5 and x64. This is a nice feature, but something in the description provided by Microsoft baffeles me. Under the section "Remarks" they say, that: The maximum index in any single dimension is 2,147,483,591 (0x7FFFFFC7) for byte arrays and arrays of single-byte structures, and 2,146,435,071 (0X7FEFFFFF) for other types. Since I mainly have int[]

Maximum number of elements in an array vs. maximum indexer value

こ雲淡風輕ζ 提交于 2020-04-12 17:24:25
问题 today I started wondering about something in the MSDN. This article demonstrates, how one can increase the memory allocatable by an array under .NET 4.5 and x64. This is a nice feature, but something in the description provided by Microsoft baffeles me. Under the section "Remarks" they say, that: The maximum index in any single dimension is 2,147,483,591 (0x7FFFFFC7) for byte arrays and arrays of single-byte structures, and 2,146,435,071 (0X7FEFFFFF) for other types. Since I mainly have int[]

Using Linq to Sql asynchronously with new async/await

柔情痞子 提交于 2020-04-09 21:06:54
问题 What are best practices to use L2S with new C# 5 async/await keywords comparing to this approach? Couldn't find any on web. 回答1: EF 5 does not have async/await support, but the open source version is actively looking into possibilities here. EDIT: the Async support in EF is documented at http://msdn.microsoft.com/en-us/data/jj819165.aspx. It doesn't stream the results in as they are hydrated (as you would find with RX) but it does make the database calls asynchronous. As for LINQ to SQL,

Using Linq to Sql asynchronously with new async/await

这一生的挚爱 提交于 2020-04-09 21:01:33
问题 What are best practices to use L2S with new C# 5 async/await keywords comparing to this approach? Couldn't find any on web. 回答1: EF 5 does not have async/await support, but the open source version is actively looking into possibilities here. EDIT: the Async support in EF is documented at http://msdn.microsoft.com/en-us/data/jj819165.aspx. It doesn't stream the results in as they are hydrated (as you would find with RX) but it does make the database calls asynchronous. As for LINQ to SQL,