Click here to Skip to main content
16,017,297 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Is it possible to create a text editor Pin
Michael Sync5-May-08 16:45
Michael Sync5-May-08 16:45 
GeneralDumb Button Question alert! Pin
Jammer13-Mar-08 13:41
Jammer13-Mar-08 13:41 
GeneralRe: Dumb Button Question alert! Pin
User 27100913-Mar-08 15:21
User 27100913-Mar-08 15:21 
GeneralRe: Dumb Button Question alert! Pin
Jammer14-Mar-08 0:06
Jammer14-Mar-08 0:06 
GeneralRe: Dumb Button Question alert! Pin
User 27100914-Mar-08 1:42
User 27100914-Mar-08 1:42 
GeneralRe: Dumb Button Question alert! Pin
Jammer14-Mar-08 7:14
Jammer14-Mar-08 7:14 
GeneralRe: Dumb Button Question alert! Pin
User 27100914-Mar-08 7:47
User 27100914-Mar-08 7:47 
GeneralRe: Dumb Button Question alert! Pin
Jammer14-Mar-08 8:01
Jammer14-Mar-08 8:01 
C# all the way ... I'm just trying this but it doesn't work yet ...

public sealed class ApplicationViewEventArgs : EventArgs
{
    private Enums.ApplicationView _applicationView;

    public Enums.ApplicationView ApplicationViewStatus
    {
        get
        {
            return _applicationView;
        }
    }

    public ApplicationViewEventArgs(Enums.ApplicationView ApplicationViewStatus)
    {
        _applicationView = ApplicationViewStatus;
    }
}

/// <summary>
/// Interaction logic for Navigator.xaml
/// </summary>
public partial class Navigator : UserControl
{
    public delegate void ApplicationViewChanged(object sender, ApplicationViewEventArgs e);

    public event ApplicationViewChanged ApplicationViewStatusChanged;

    public Navigator()
    {
        InitializeComponent();
    }

    private void btnBrowseView_Click(object sender, RoutedEventArgs e)
    {
        if (ApplicationViewStatusChanged != null)

            ApplicationViewStatusChanged(this, new ApplicationViewEventArgs(Enums.ApplicationView.BrowserView));

    }

    private void btnDatabaseView_Click(object sender, RoutedEventArgs e)
    {
        if (ApplicationViewStatusChanged != null)

            ApplicationViewStatusChanged(this, new ApplicationViewEventArgs(Enums.ApplicationView.DataBaseView));

    }
}


with this in my main window:

private void Navigator_ApplicationViewStatusChanged(object o, ApplicationViewEventArgs e)
{
    lyrBrowserView.Visibility = Visibility.Hidden;
    lyrDatabaseView.Visibility = Visibility.Hidden;

    switch (e.ApplicationViewStatus)
    {
        case Enums.ApplicationView.BrowserView:
            lyrBrowserView.Visibility = Visibility.Visible;
            break;
        case Enums.ApplicationView.DataBaseView:
            lyrDatabaseView.Visibility = Visibility.Visible;
            break;
    }
}


the Enums look like:

public static class Enums
{
    public enum ApplicationView
    {
        BrowserView = 0,
        DataBaseView = 1,
        ConfigurationView = 2
    }
}


This is the first time I've even delt with events! Not going well ... Frown | :(

Jammer

Going where everyone here has gone before! Smile | :)
My Blog

GeneralRe: Dumb Button Question alert! Pin
User 27100914-Mar-08 8:14
User 27100914-Mar-08 8:14 
GeneralRe: Dumb Button Question alert! Pin
Jammer14-Mar-08 8:30
Jammer14-Mar-08 8:30 
GeneralRe: Dumb Button Question alert! Pete Can you look at this for him? Pin
User 27100914-Mar-08 8:42
User 27100914-Mar-08 8:42 
GeneralRe: Dumb Button Question alert! Pete Can you look at this for him? Pin
Jammer14-Mar-08 9:28
Jammer14-Mar-08 9:28 
GeneralRe: Dumb Button Question alert! Pete Can you look at this for him? Pin
Pete O'Hanlon16-Mar-08 9:57
mvePete O'Hanlon16-Mar-08 9:57 
GeneralRe: Dumb Button Question alert! Pete Can you look at this for him? Pin
Jammer16-Mar-08 10:03
Jammer16-Mar-08 10:03 
GeneralRe: Dumb Button Question alert! Pete Can you look at this for him? Pin
Pete O'Hanlon16-Mar-08 10:05
mvePete O'Hanlon16-Mar-08 10:05 
GeneralRe: Dumb Button Question alert! Pete Can you look at this for him? Pin
Jammer16-Mar-08 10:08
Jammer16-Mar-08 10:08 
GeneralThe killer question Pin
Ed.Poore13-Mar-08 9:52
Ed.Poore13-Mar-08 9:52 
GeneralRe: The killer question Pin
User 27100913-Mar-08 11:35
User 27100913-Mar-08 11:35 
GeneralRe: The killer question Pin
Ed.Poore13-Mar-08 11:40
Ed.Poore13-Mar-08 11:40 
GeneralRe: The killer question Pin
User 27100913-Mar-08 15:24
User 27100913-Mar-08 15:24 
GeneralRe: The killer question Pin
Ed.Poore13-Mar-08 15:49
Ed.Poore13-Mar-08 15:49 
GeneralRe: The killer question Pin
Pete O'Hanlon14-Mar-08 2:21
mvePete O'Hanlon14-Mar-08 2:21 
GeneralRe: The killer question Pin
Ed.Poore14-Mar-08 3:28
Ed.Poore14-Mar-08 3:28 
GeneralError Help Pin
Jammer13-Mar-08 2:37
Jammer13-Mar-08 2:37 
GeneralRe: Error Help Pin
User 27100913-Mar-08 3:36
User 27100913-Mar-08 3:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.