Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

Alisaunder

@Alisaunder
About
Posts
76
Topics
10
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • WPF ListBox Drag and drop Security elevation issue.
    A Alisaunder

    Hey guys I've written a small app that allows you to drag files from your desktop or explorer into a Listbox this creates a list of files to be backed up on a certain date and time you have selected. Every thing works perfectly fine in debug running from visual Studio 2019. Once I switch to release and attempt to create an install shield setup for it, The setup works fine and it installs but it shows a no symbol when you try to drag files into the Listbox. I've read that you must change the app.Manifest to an elevated setting but I tried that with no success. Please any help figuring this out would be very much appreciated.

    WPF csharp help visual-studio wpf security

  • WPF ListBoxView Problem
    A Alisaunder

    Thank you I managed to get it to work using the Drag to trash like you suggested. I simply added a Stack panel that stretched Horizontally to give the user plenty of room to click on added an icon and label, works perfect. Although if you help me figure out how to catch multiple selected files being dragged from the ListBoxView to the trash It would be better, right now it's single file only. Having the option to drag one or multi is nice. I will go ahead and mark this solved since you did help me solve the original issue.

    WPF help csharp wpf database graphics

  • WPF ListBoxView Problem
    A Alisaunder

    I' making a very simple app to drag files from my desktop or explorer into a WPF ListBoxView, these files will be auto backed up on a specific day and time. I have the dragging files into the ListBoxView working fine. Can even insert Multiple selected at one time. I can rearrange my list order by dragging and dropping fine as well. My issue is I can't seem to trigger it to remove the file I drag out of the ListBoxView control to remove it from the List. Can anyone help ?? My Xaml

    My C#

    private void DropList_Drop(object sender, DragEventArgs e)
    {
    if (e.Data.GetDataPresent(DataFormats.FileDrop))
    {
    string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
    foreach (string data in files)
    {
    if (!dropList.Items.Contains(data))
    dropList.Items.Add(data);
    }
    }
    else
    {
    object data = e.Data.GetData(typeof(string));
    dragSource.Items.Remove(data);
    dropList.Items.Add(data);
    }
    }

        private void DropList\_MouseMove(object sender, MouseEventArgs e)
        {
            // Get the current mouse position
            Point mousePos = e.GetPosition(null);
            Vector diff = startPoint - mousePos;
    
            if (e.LeftButton == MouseButtonState.Pressed &&
                (Math.Abs(diff.X) > SystemP
    
    WPF help csharp wpf database graphics

  • How can I Bind a DataTemplate Slider definition to the Code behind?
    A Alisaunder

    In my project I have this xaml code for my slider

    My code Behind this is

    // preparing tab content slider transformation
    ScaleTransform scaleTransform = new ScaleTransform();
    Binding scaleXBinding = new Binding("Value");
    scaleXBinding.Source = scaleSlider;
    Binding scaleYBinding = new Binding("Value");
    scale

    WPF wpf question wcf announcement workspace

  • New to .net/ previous programming background
    A Alisaunder

    MVVM seems to be the appropriate style everyone can agree upon for WPF. My problem is with certain third party controls you can't use MVVM. I use Actipro Software's WPF ribbon for example and it doesn't support MVVM. Another issue I've had with MVVM is using Treeview controls and responding to the node selected. While there are way to do it in MVVM it seems way more difficult then simply using Visual Studio to create the events. The whole purpose is to separate the code from the XAML by using binding. While I do practice this for the most part sometimes you just can't justify writing something that has a learning curve which increases the projects time to complete by two fold. It boils down in my opinion to what ever method works best for you and the company you work for. I have a much better understanding of MVVM now than I had but it doesn't help to try to learn a new style of programming using controls that aren't designed to work with that style.

    WPF csharp database wpf question career

  • Windows 8 on my desktop, or not?
    A Alisaunder

    I have mixed emotions on this too. On the one hand I need to stay up to date on developing applications to run on Microsoft's newer platforms. On the other I really don't like Metro. I though oh how wonderful someone found a way to disable it and go back to the Windows 7 look, then they locked it out of the RC and I'm sure the release. I'm thinking this is the year Linux gains more ground. I've recently played with a debian release that strongly resembles Windows 7 in looks and feel. This will make it so much more appealing to those that are currently using windows 7 and don't want to switch to 8 because of metro. The same thing can be said of businesses. They can upgrade workstations with SolusOS and employees won't have much of a problem relearning the system. Granted there are some that will say otherwise that switching to Windows 8 and heading straight to the desktop will be just as easy but I still feel it was a bad move on Microsoft's part to not allow the option to have either look available. You don't jump straight into a new OS without having some backward compatibility. This is apparently what they want to do on the UI.

    The Lounge csharp c++ wpf design regex

  • How to bind inverse boolean properties? - [Answered]
    A Alisaunder

    Got it working! Was a really stupid mistake I forgot to tell it the source of where my variable to tie it too was. Since it's a Property stored by the project I had to do the IsEnabled command as so:

    IsEnabled="{Binding Source={x:Static prop:Settings.Default}, Path=dbOpen, Converter={StaticResource booleanNotConverter}}"

    WPF question csharp database wpf wcf

  • How to bind inverse boolean properties? - [Answered]
    A Alisaunder

    I tried that and sadly it didn't change anything. One thing is possible I'm using the Actipro WPF Ribbon and it's the QAT open button, and backstage open buttons I'm trying to disable using this method. I don't know if by chance it's an issue with their control or not. I can tell you that I have had success using a regular boolean converter to enable/disable the buttons on their ribbon, just not this inverted boolean converter.

    WPF question csharp database wpf wcf

  • How to bind inverse boolean properties? - [Answered]
    A Alisaunder

    For some reason it's just not working as expected. The open database button is enabled by default this allows it to open a database. Once I load the database I set the dbOpen property to True which if this is working properly should disable the button since it inverts the True to a false. But it's not. The Button is enabled the entire time. Now I know dbOpen is true because my code to load the database will only run if(!System.Properties.Default.dbOpen), and while the button does not disable the code to open the database does not fire when clicked.

    WPF question csharp database wpf wcf

  • How to bind inverse boolean properties? - [Answered]
    A Alisaunder

    Let me clarify that a bit more. I'm currently binding my buttons to be enabled if my Stored settings bool value is true. Meaning in this case dbOpen. This is true if my database is loaded, false if it's closed. Now I have certain buttons I want to be enabled when this is true so I have the xml code like this:

    IsEnabled="{Binding Source={x:Static prop:Settings.Default}, Path=dbOpen, Mode=TwoWay}"

    Now I want certain buttons to be able to be disabled when the dbOpen is true so how do I flip the value in the xml statement? in c# it would be like : If (Settings.Default.dbOpen) to check if it's not true you would If(!Settings.Default.dbopen)

    WPF question csharp database wpf wcf

  • Another MVVM questionn regarding updating info on other controls? - [Answered]
    A Alisaunder

    I think I understand. I've noticed that MVVM is basically Bind everything lol.

    WPF wpf question csharp database architecture

  • Another MVVM questionn regarding updating info on other controls? - [Answered]
    A Alisaunder

    I'm not sure I understand. How would binding allow me to display something like, Management Mode - Contacts Manager - Editing Contacts? Or Management Mode - Contacts Manager - Create New Contact?

    WPF wpf question csharp database architecture

  • Another MVVM questionn regarding updating info on other controls? - [Answered]
    A Alisaunder

    Still trying to grasp MVVM here. I have 4 controls I display from my main form. Basically

    How can I update say messages for the status bar when things occur inside one of the other controls. Lets say On the RibbonControl there is a button to open the database. The code to open it would include references to displaying a message on the statusbar control that the form is loading and also update the title of the form to display the path of the database, name and title of the application. Now I can do this in regular WPF but their is code behind I'm trying to understand how to do this in MVVM.

    WPF wpf question csharp database architecture

  • General question on MVVM
    A Alisaunder

    The problem I have with MVVM is it is very difficult to implement multiple usercontrols on the same form. I like to have my ribbonbar as one user control, a sidepanel treeview control as another usercontrol, a tabcontrol as another usercontrol, and a statusbar of course as another usercontrol. I generally have a mainform that I place these on using and etc. I've tried using caliburn micro to no avail as it will not display my controls even if I have no errors.

    WPF wpf question lounge csharp com

  • ComboBox MVVM Issue
    A Alisaunder

    Are you using INotifyPropertyChanged in your collection?

    WPF wpf architecture help tutorial

  • user control
    A Alisaunder

    Your error is going to be in the myeditor usercontrol. Like Jeremy suggested check to ensure that your image sources on the control are correct, and that the control is able to locate them during runtime.

    WPF wpf learning

  • Get Active mdichild form
    A Alisaunder

    This is how I did it when using MDI. I used a Tree View control populated with A-Z subnodes would be names organized last to first with a comma and middle initial, and I would store the id of the record containing the information in the tag element of the Tree View like so.

    private void updateTreeview()
    {
    //add letters sort nodes
    for (int i = System.Convert.ToInt32('A'); i <= System.Convert.ToInt32('Z'); i++)
    {
    treeView1.Nodes.Add(Convert.ToString((char)(i)), Convert.ToString((char)(i))); //set key and text
    }

            //add customers
            TreeNode childnode = null;
            string sContactsName = null;
            foreach (DataRow rowContacts in dtContacts.Rows)
            {
                sContactsName = string.Concat(rowContacts\["LastName"\].ToString(), ", ", rowContacts\["FirstName"\].ToString());
    
                if (!(System.Convert.IsDBNull(rowContacts\["MiddleInitial"\].ToString())))
                {
                    sContactsName = string.Concat(sContactsName, " ", rowContacts\["MiddleInitial"\].ToString(), ".");
                }
                //---------------------Key lines here --------------
                childnode = new TreeNode(sContactsName, 0, 1);
                childnode.Name = sContactsName; //set text as key
                childnode.Tag = rowContacts\["ContactID"\].ToString();
                //--------------------------------------------------
    
                string sortnode = sContactsName.Substring(0, 1).ToUpper(); //gets alphabet sort node by first letter
                treeView1.Nodes\[sortnode\].Nodes.Add(childnode);
            }
    
            //Update TreeView
            treeView1.Visible = true;
            treeView1.Enabled = true;
            treeView1.ExpandAll();
        }
    

    After the node containing the name was clicked I handled it like this:

        private void treeView1\_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            string nodeName = e.Node.Name;
    
            if (nodeName.Length == 1)
            {
                return; //is alphabet sort node, exit
            }
    
            //see if child form already exists and show it
            foreach (Form f in this.MdiChildren)
            {
                if (f.Name == nodeName)
                {
                    f.Activate();
                    return;
                }
            }
    
    
            str
    
    C# tutorial

  • Get Active mdichild form
    A Alisaunder

    What I used to do was store a value typically the id of the record or individual. I stored this value as the tag value of the child form created. In this way you can make certain not to replicate already created or open form by comparing this value to be created with the values stored in all of the currently open and active forms. I now use Tabs instead of MDI in most of my applications though which is why I said used.

    C# tutorial

  • Play DVD
    A Alisaunder

    I have a sneaky feeling this is going to be one of those DRM issues. I'm pretty sure the reason for the media player control not being able to read DVD formats is the encoding and that is due to DRM copyrights. I could be wrong but I feel correct about this.

    WPF csharp wpf tutorial question

  • Hypothetical Discussion - Multi core CPU's and Software utilization
    A Alisaunder

    By the way this is a hypothetical discussion I wasn't referring to current threading technology I was referring to a new way of trying to implement and utilize the extra cores inside a processor using the OS sort of like SLI does with a device driver and GPU's.

    Windows Forms asp-net question discussion code-review
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups