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
D

Deepak VS

@Deepak VS
About
Posts
3
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Combo box items drop dowm
    D Deepak VS

    You can handle the GotFocus Event as shown below

    private void ComboBox_GotFocus(object sender, RoutedEventArgs e)
    {
    (sender as ComboBox).IsDropDownOpen = true
    }

    WCF and WF question

  • Manually Updating GridViewColumn with DisplayMemberBinding binding set
    D Deepak VS

    One approach you can try is to define celltemplate for the column as shown below

    <GridViewColumn x:Name="gdcol">
    <GridViewColumn.CellTemplate>
    <DataTemplate>
    <TextBlock x:Name="txtbox" Text="{Binding Path}"/>
    </DataTemplate>
    </GridViewColumn.CellTemplate>
    </GridViewColumn>

    then in code where you want to update the target:

    object obj = gdcol.CellTemplate.LoadContent();
    TextBlock blk = obj as TextBlock;
    BindingExpression exp = BindingOperations.GetBindingExpression(blk, TextBlock.TextProperty);
    exp.UpdateTarget();

    I have not tried the code, you can give it a shot.

    WCF and WF question wpf wcf announcement

  • Pass by value
    D Deepak VS

    Pass by value and pass by reference: Passing mechanisms decide how changes made to the parameter affect the caller. Consider the following code snippet Ex: class MyClass { public int value; } class Program { ..void funcPassbyValue(MyClass obj) { obj.value = 10; obj = new MyClass(); obj.value = 5; } ..void func2PassbyRef(ref MyClass obj) { obj.value = 10; obj = new MyClass(); obj.value = 5; } .. Main() { MyClass passedObj = new MyClass(); funcPassbyValue(passedObj ); Console.WriteLine(passedObj .value); //Outputs 10 func2PassbyRef(ref passedObj ); Console.WriteLine(passedObj .value); //Outputs 5 } } You can see both the methods funcPassbyValue && func2PassbyRef differ only in their signature. Things which happen in common to both the methods: Any changes made to the argument to the method will be reflected back (condition is the changes are done while the parameter - in this case obj - is not changed to refer other object). what does funcPassbyValue do differently: any changes made to the parameter (obj) will be local within the method and will not change (change here means to make it refer other object) the passedObj to refer other object. Hope this clears your doublt. what does func2PassbyRefdo differently: any changes made to the parameter (obj) will be reflected back to the caller in this case passedObj is changed to refer to the new object created inside the method.

    C# csharp asp-net performance help tutorial
  • Login

  • Don't have an account? Register

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