Skip to content

Instantly share code, notes, and snippets.

@danvacam
danvacam / HtmlHelperExtensions
Created October 10, 2014 09:51
razor html helper for action link with span
public static class HtmlHelperExtensions
{
public static MvcHtmlString IconActionLink(this HtmlHelper htmlHelper, string linkText, string iconClass,
string actionName, string controllerName)
{
return IconActionLink(htmlHelper, linkText, iconClass, string.Empty, actionName, controllerName, null);
}
public static MvcHtmlString IconActionLink(this HtmlHelper htmlHelper, string linkText, string iconClass, string actionName, string controllerName, IDictionary<string, object> htmlAttributes)
{
@danvacam
danvacam / MainWindow.xaml
Created May 27, 2014 10:55
Making borderless resizable window in WPF
<Window x:Class="Wpf.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525" WindowStyle="None" AllowsTransparency="True" Background="Transparent" >
<Grid x:Name="LayoutRoot"
Background="White" Margin="4">
<Grid.Effect>
<DropShadowEffect BlurRadius="15" Direction="-90" RenderingBias="Quality" ShadowDepth="2"/>
</Grid.Effect>