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
C

Cracked Down

@Cracked Down
About
Posts
111
Topics
13
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Firing an ICommand from a Style?
    C Cracked Down

    whats the event that you want to handle? is it selection event? if it is, then you dont have to goto style for this

    WPF wpf design question

  • WPF TreeView Style
    C Cracked Down

    you can do this using the following steps.

    .
    .
    .
    <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />

    .
    .
    .

    and in the treeview

    and in the datatemplate add a key

    I would like note one thing about managing resources. All the related resources should be added in the resource dictionary. In your case I would like to suggest that, have separate resource dictionary e.g. "NavigationTreeResources.xaml" for TreeView and add your DataTemplates and style in it. Adding the resources in Windows makes the windows.xaml huge as well as restrict the scope of the resources to current :) window. Hope this information helps to solve your problem

    Happy Coding :-D:-D

    WPF csharp database wpf

  • move App.Config to AppData folder
    C Cracked Down

    you should not move application configuration file to AppData. Reason : App.config file is configuration for the application as its name suggest but at the time of deployment. You should not touch this file once the application is installed. The reason why this file is copied to the installation folder is same as that of all the exes and dlls that you deploy. which are not editable or undergo any changes unless a new version is installed. Installation folder : is a base image of your application App Data Folder : is deployment/user specific and can be altered at any time. Generally, administrator has a rights to change the installation folder. A normal user can not change any files within it. Problem arises when you give control to user over this installation directory. Think if this config file is tempered by the user. Config files are automatically loaded by the application and hence result in application crash where as, appData folder can be loaded and validated by the code. I am not sure why you want to do this but, I am guessing you want some of the settings to be altered at the run time. If that is the case then there is option for doing this in the visual studio. There are two types of the settings Application & User, user use setting for this case Hope this helps :-D Happy Coding

    C# question

  • Excel Chart in C#
    C Cracked Down

    I you intention is to display graphs/charts then you can achieve this by using the free library shipped with .Net 4.0. have look Happy Coding :-D

    C# csharp css question

  • C# Setup and Deployment
    C Cracked Down

    Try this Happy Coding :-D

    C# database sysadmin csharp sql-server help

  • What is the exact difference between heap and stack?
    C Cracked Down

    Finally some one has answered!!! ;P ;P ;P ;P

    C# question data-structures help

  • Book On C# Programming Code
    C Cracked Down

    Jeffery Richter's book Applied Microsoft.NET framework programming CLR via C# Best according to me...

    C# csharp learning

  • General question on MVVM
    C Cracked Down

    Well, for someone who has started WPF stuff, MVVM, Commanding & Data Binding looks bit confusing because of the numerous articles on the Internet. You might have visit some of those articles and come to this point where you would like to know more about the MVVM. When I had started the WPF had the same issue that you currently facing. The main advantages of the pure MVVM implementations are 1. Separation of concerns 2. Help out for Unit testing 3. Development can be carried out parallel 4. Tracing the changes/Impact and development is quite easy(this one is my favorite) Implementing pure MVVM(not writing a single code of line communicating VM or M) is bit time consuming as you have to spend lot of time searching for the mechanism for communication e.g. double click events that you mentioned in your question above. But believe me you will enjoy implementing it :-D To implement the Pure MVVM following points should be considered 1. Do not write single line of code communicating to the VM or Model 2. Though, View can contain the code lines related to GUI only. e.g. Adjusting some controls custom width/height on window size change, can go in main windows xaml.cs file as it has nothing to do with our VM and M. Its purely related to the View 3. If any controls needs to be referenced from the code behind, reference them from the App.xaml.cs file. App.xaml.cs, you can consider this as start up configuration. e.g. customizing the Title bar (showing the Title bar like Avast Antivirus check here) can go here. 4. Start the code from the App.xaml.cs file, configure your application here, like logging initialization, start up screen display, unhanded exception etc. 5. Inject the Model and View in the View model, this is best practices as view modes knows about view as well as model (know only at interfaces level) 6. Have a BaseVM class which will implement the INotifyPropertyChanged and derive your all Vm from this. This will help in eliminating repeated code Hope this will help you get going :-D Happy Coding :-D

    WPF wpf question lounge csharp com

  • WPF HierarchicalDataTemplate Questions:
    C Cracked Down

    Kevin, I was trying to help you out and asked couple of questions to understand the problem statement better. I worked a lot on Hierarchical data and thought could help you. But, instead of replying and clarifying the problem you down voted my reply... Also, I noticed that in one of the question from the C# forum (licensing related question) without understanding the answer provided you directly replied to it saying this will not work. That's why I replied to you post... Sorry if I hurt you sentiments Happy Coding :)

    WPF csharp database wpf

  • the wpf added winform controls
    C Cracked Down

    There is a workaround which can be used to avoid this issue You need to wrap the WinformHost with UserControl of WPF. Follow these steps 1. Create a user control in the WPF (lookless control) 2. Create a style for this control 3. In the template of the style add WinformHost with x:name 4. Now override the OnApplyTemplate() of this control 5. Provide the .Child property of the Winformhost, added in the control template to the actual winform control that you want to display. Wrapping the winform control in the WPF control will avoid overlapping the WPF controls. This overlapping is due to difference in the mechanism for rendering control in WPF and Winforms. Winforms: uses GDI+ for rendering WPF: uses DirectX for rendering Hope this will help you to solve your problem Happy Coding :)

    WPF question csharp wpf com

  • Catch all but a specific exception
    C Cracked Down

    did this solution helped you?

    C# data-structures question

  • Alternative to Application.StartupPath
    C Cracked Down

    Is directory of the B is relative to the A's directory then you can calculate the path for B's directory get the App path and then add directories or remove directories depending on the B's location... Assuming that B's directory does not change with respect to A's Happy Coding :)

    C# csharp help question

  • WPF HierarchicalDataTemplate Questions:
    C Cracked Down

    You should not disrespect the other people, Or you should not ask the questions if you don not want to get the answer... Happy Coding :)

    WPF csharp database wpf

  • WPF HierarchicalDataTemplate Questions:
    C Cracked Down

    This can be achieved by using the style template and DataTriggers (will give you the sample code). Before that, I am not sure why you want to use the Hyperlinks inside the TreeNode. Could you please help me to understand its need. This will help me to give you the answer! Happy Coding :)

    WPF csharp database wpf

  • Resize Button according to windows form size
    C Cracked Down

    Use of Anchor property will help you in this case Layout has different properties like Anchor, Margin, Dock, Size, Min size Max size. Use these in combination to achieve the output you are looking for Happy Coding :)

    C# csharp wpf com data-structures help

  • c# combo box binding
    C Cracked Down

    In the main question that you posted look at the bottom you will find the resolved option Before posting on CP first check for the solution online (google).. if you dont find it there then CP is always there........ Happy Coding :)

    C# wpf csharp wcf design tutorial

  • c# combo box binding
    C Cracked Down

    welcome..please mark this as resolved.

    C# wpf csharp wcf design tutorial

  • c# combo box binding
    C Cracked Down

    Code file:

    using System.Windows.Media;
    using System.Windows.Media.Imaging;
    using System.Windows.Navigation;
    using System.Windows.Shapes;

    namespace WpfApplication1
    {
    /// /// Interaction logic for MainWindow.xaml
    ///
    public partial class MainWindow : Window
    {
    public MainWindow()
    {
    InitializeComponent();
    this.DataContext = this;
    }

        public List CMBItems
        {
            get
            {
                return new List { "a","b","c","d"};
            }
        }
    }
    

    }

    xaml

    C# wpf csharp wcf design tutorial

  • c# combo box binding
    C Cracked Down

    you need to set the path to Selected value in the binding. refer below code

    Text="{Binding ElementName=comboBox1, Path=SelectedValue}"/>

    in the code expose property as

    public List CMBItems
    {
    get
    {
    return new List { "a","b","c","d"};
    }
    }

    Hope this will help! Happy Coding :)

    C# wpf csharp wcf design tutorial

  • software copy protection
    C Cracked Down

    Well, most of your steps are correct except validating the copy with the value stored on the server. Instead of that, following steps could be used 1.At the first launch of the application, present user an activation form 2.Provide "Request" button to send the information to some email id 3.Clicking on the button fetch the UID of the system and send these details to server 4.Also, application should write some file say "app.lic" on the machine with identifier indicating the state as requested and the UID related details 5. Write some procedure at your end "Application License Provider" 6. Generate the activation and send to user 7. At user side read the activation key, validate the "app.lic" and if the identifier from both matches activate the license. Advantages: 1. No internet connectivity required (except for the activation) 2. good for implementing the time based licensing. Disadvantages: 1. Reformatting or replacing the hardware used as UID leads to invalid license. 2. Not good for life time licensing. Depending on the requirement algorithm or approach could change.Every approach has its advantages and disadvantages. So, have good thoughts upfront before implementing the copy protection for your application. Happy Coding :)

    C# question
  • Login

  • Don't have an account? Register

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