[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

LIGHTBOX EFFECT IN WPF APPLICATION

Posted on 2010-03-27
4
Medium Priority
?
2,279 Views
Last Modified: 2013-11-12
Experts,
Can you suggest me some urls from where I can get the knowledge about the implementation of the lightbox effect in the wpf application.
You can provide me the urls of the tutorials or some pages where it is having the code to implement the same .
Experts I am not developing the web application .I am developing the windows based application so please do not give me the silverlight results.If you think those are all the same then it is ok.
Thanking you,
Anindya
0
Comment
Question by:ANINDYA
  • 3
4 Comments
 
LVL 16

Expert Comment

by:CuteBug
ID: 28777641
0
 
LVL 16

Expert Comment

by:CuteBug
ID: 29098985
0
 

Author Comment

by:ANINDYA
ID: 29244008
Expert I have an error on the following file as

Error      1      The type or namespace name 'BlurEffect' could not be found (are you missing a using directive or an assembly reference?)      
Error      3      'WpfApplication1.Window1' does not contain a definition for 'Effect' and no extension method 'Effect' accepting a first argument of type 'WpfApplication1.Window1' could be found (are you missing a using directive or an assembly reference?)      


on the file Window1.xaml
and the Window1.xaml.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
namespace WpfApplication1
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();

        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {

            BlurEffect blur = new BlurEffect();
            var current = this.Background;
            blur.Radius = 5;
            this.Background = new SolidColorBrush(Colors.DarkGray);
            this.Effect = blur;
            MessageBox.Show("hello");

            this.Effect = null;
            this.Background = current;
        }
    }
}


The code of the Window1.xaml file is as followes 

<Window x:Class="WpfApplication1.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
        
        
        
        Height="300"
        Width="500"
        Background='LightBlue'>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height='Auto' />
                <RowDefinition Height='80' />
                <RowDefinition Height='Auto' />

            </Grid.RowDefinitions>

            <TextBlock FontFamily='Consolas'
               Foreground='White'
               Text='Use Blur to Focus Attention'
               FontSize='24'
               Margin='20' />
    <StackPanel Orientation='Horizontal'
                Grid.Row='1'
                Margin='20,0'>
      <TextBlock Text='Loan Amount' />
      <TextBox VerticalAlignment='Top'
               Margin='20,0'
               MinWidth='100' />
    </StackPanel>
    <StackPanel Orientation='Horizontal'
                Grid.Row='2'
                Margin='20,0'>
      <Button Content='OK'  />
      <Button Content='Cancel' />
    </StackPanel>
  </Grid>
    </Window>

Open in new window

0
 
LVL 16

Accepted Solution

by:
CuteBug earned 200 total points
ID: 29309424
Do you not have a reference added to PresentationCore.dll?
This dll contains the namespace System.Windows.Media.Effects in which BlurEffect is defined.
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question