Nice article by Martin Kearn on .Net Restful API's:
This blog is primarily a compilation of frequently faced issues by developers with solutions which I have implemented to solve them
Saturday, January 10, 2015
Introduction to REST and .net Web API
Labels:
.net Web API,
REST
Solution Architect employed with Mercedes Benz with about 14 years of experience in Microsoft Technologies.
Friday, January 2, 2015
C# 6.0 New Features
http://www.kunal-chowdhury.com/2014/12/csharp-6-expression-bodied-method.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+kunal2383+%28Kunal%27s+Blog%29
Labels:
C# 6.0
Solution Architect employed with Mercedes Benz with about 14 years of experience in Microsoft Technologies.
Nice article on IDataErrorInfo and Validation in WPF
http://www.codeproject.com/Articles/858492/WPF-Validation-Using-IDataErrorInfo
Labels:
IDataErrorInfo,
validation,
WPF
Solution Architect employed with Mercedes Benz with about 14 years of experience in Microsoft Technologies.
Thursday, December 18, 2014
Solving WPF Binding ConverterParameter problem
Write a multiconverter instead:
<TextBlock FontSize="16" FontFamily="GE Inspira Medium" VerticalAlignment="Center" Foreground="Black"> <TextBlock.Text > <MultiBinding Converter="{StaticResource flowRateUnitConverter}"> <Binding Path="FlowRate"/> <Binding Path="Unit"/> </MultiBinding> </TextBlock.Text> </TextBlock>
MultiConverter class
public class FlowRateUnitConverter : IMultiValueConverter { public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { if (values[0] == null || values[1] == null) return string.Empty; float? flowRate=values[0] as float?; string unit = values[1] as string; string convertedValue = values[0].ToString(); switch(unit) { case "L/Hr": convertedValue = (flowRate.Value * 60).ToString(); break; default: break; } return convertedValue; } public object[] ConvertBack( object value, Type[] targetTypes, object parameter, CultureInfo culture) { throw new NotSupportedException(); } }
Labels:
Converterparameter binding,
Multiconverter,
WPF
Solution Architect employed with Mercedes Benz with about 14 years of experience in Microsoft Technologies.
Wednesday, December 17, 2014
Get/Set property value in an object instance using reflection
public static object GetPropValue(T src, string propName) { return src.GetType().GetProperty(propName).GetValue(src, null); }
public static object SetPropValue(T src, string propName, object value) { return src.GetType().GetProperty(propName).SetValue(src, value); }
Labels:
C#.Net,
Reflection
Solution Architect employed with Mercedes Benz with about 14 years of experience in Microsoft Technologies.
Wednesday, December 10, 2014
WPF Performance Issues and knowledge about UI rendering
http://www.codeproject.com/Articles/784529/Solutions-for-WPF-Performance-Issue
Labels:
UI Rendering,
WPF,
WPF Performance
Solution Architect employed with Mercedes Benz with about 14 years of experience in Microsoft Technologies.
Wednesday, December 3, 2014
Refer WPF dictionary in another library
<UserControl x:Class="ProcessPictureUserControls.DualSensors" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:lib="clr-namespace:PPLibrary;assembly=PPLibrary1.12.0.1" xmlns:sys="clr-namespace:System;assembly=mscorlib" mc:Ignorable="d" Name="UserControl" d:DesignHeight="40" d:DesignWidth="200"> <UserControl.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/PPLibrary1.12.0.1;component/Themes/Styles.xaml"/> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </UserControl.Resources>...<Border Name="InnerBorder" CornerRadius="20" Margin="3" BorderBrush="LightGray" Background="{StaticResource ResourceKey=DarkBrush}" BorderThickness="{Binding Path=RegulationState, Mode=OneWay, Converter={StaticResource ResourceKey=regulationStateToBorderOnOffConverter},FallbackValue=1}" />
Labels:
ResourceDictionary,
WPF
Solution Architect employed with Mercedes Benz with about 14 years of experience in Microsoft Technologies.
Subscribe to:
Posts (Atom)