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

DeepakMega

@DeepakMega
About
Posts
24
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • WCF in Managed Application
    D DeepakMega

    About your second issue, you need an config file for the client or server. You can add these configurations programatically I used to get this error, as i had a connection stirng in one config file and the wcf settings in other config file. Combining then worked for me. And also check the debug/release folders and check the config files are of correct names..

    WCF and WF help csharp wcf sysadmin hosting

  • WCF config Endpoint not found error [modified]
    D DeepakMega

    sorry that error was from a different temporary project i created to check.. It is "ServiceReferenceReview.IReviewService" and not IComments.. Anyway i solved the problem by renaming the config file of wcf client to the console project exe's name.. But this doesn't help in my other project where i need to create a visual studio addin , which uses wcf client to connect to server. In this case the vs addin creates a dll file which further references the wcf client dll file. The problem is the config file of wcf client , i tried remaining it to the vs addin dll's name but it didn't work . The config file should be renamed to the startup project's exe name(which references the wcf client lib).. Here is my projects

    Host
    --WcfReviewService
    --WcfReviewServiceHost - this is host project which references the above service.
    Client
    --ReviewClient - This is wcf client which connects to host.
    --ReviewAddin - VS addin project which references the above client.

    The problem here is where do i put the config file generated from ReviewClient and what name it should be in? There is a way to make a wcf client to work without config file, by programmatically configure the endpoints and interface, but is there any other way?

    WCF and WF csharp wcf sysadmin help workspace

  • WCF config Endpoint not found error [modified]
    D DeepakMega

    I have a wcf server service running fine.. In the "wcf client project" i create a reference to that service and it runs fine.. But when the client has two projects - "wcf client"(ReviewClient) and startup "console project", the "console project" has reference to the wcf client which it calls, it gives an error at the line of creating client Error "Could not find default endpoint element that references contract 'ServiceReferenceReview.IReviewService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element." I tried copying the config file(ReviewClient.dll.config) generated by the "wcf client project"(ReviewClient) to the output of "console project" where ReviewClient.dll is also located, but it still gives the same error. This is my host app.config file

    and this is my wcf client (ReviewClient) config file

    WCF and WF csharp wcf sysadmin help workspace

  • Attach scrollbar to listview
    D DeepakMega

    Take a look at this CP article about custom scrollbars [^]

    C# question

  • display 60 questions with options
    D DeepakMega

    Check this article, its in vb.net Online Quiz[^]

    .NET (Core and Framework) tutorial

  • memberwiseclone of a control dynamically
    D DeepakMega

    Hi, I need to copy paste controls on a canvas. All controls are wrapped inside the ContentControl. I need to copy this contentcontrol and paste on the canvas. contentcontrol doesnt have memberwiseclone function. Pls help me.. Thank you

    WCF and WF help

  • UserControl - visualbrush not rendered
    D DeepakMega

    Ive solved it by replacing the rectangle with border. And setting the borders background to visualbrush binded to textblock, without using resources. I think the problem was that the visualbrush resource was within the usercontrol. Thank you.

    WPF wpf question csharp html css

  • UserControl - visualbrush not rendered
    D DeepakMega

    I am new to wpf. I have created a reflective textblock usercontrol .

    <UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="LogoCreator.ReflectiveTextBlock"
    Height="50" Width="189" mc:Ignorable="d">
    <UserControl.Resources>
    <VisualBrush x:Key="ReflectionBrush" Visual="{Binding ElementName=textBlock}"/>
    </UserControl.Resources>
    <Grid>
    <Grid.RowDefinitions>
    <RowDefinition Height="Auto" />
    <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>
    <TextBlock x:Name="textBlock" Grid.Row="0" Margin="0" FontSize="18.667" Text="Sample1" TextWrapping="Wrap" HorizontalAlignment="Left" Background="White"/>
    <Rectangle x:Name="Reflection" Grid.Row="1" Margin="0,1,0,-32" RenderTransformOrigin="0.5,0.5" Fill="{DynamicResource ReflectionBrush}">

    		<Rectangle.OpacityMask>
    			<LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,1">
    				<GradientStop Color="#7EFFFFFF" Offset="0"/>
    				<GradientStop Offset="0.5"/>
    			</LinearGradientBrush>
    		</Rectangle.OpacityMask>
    		<Rectangle.LayoutTransform>
    			<TransformGroup>
    				<ScaleTransform ScaleX="1" ScaleY="-1"/>
    			</TransformGroup>
    		</Rectangle.LayoutTransform>
    
    	</Rectangle>
            
    </Grid>
    

    </UserControl>

    I have the rectangles fill property set to the textblocks visual brush. The problem is when this control is add to the main window canvas, it shows only the text, the reflection is not shown. Is it because the visualbrush resource is within the usercontrol ? How do i solve it ?

    WPF wpf question csharp html css

  • WPF- Databinding set path
    D DeepakMega

    The name property contains only a string eg. "Blue" The comboBox is filled with colors from Colors list. Helper h=new Helper(); this.comboBox.ItemsSource =h.GetPropNames(typeof(Colors)); The first property is a color and second one is Name, hence the full string looks like this "System.Windows.Media.Color.Blue Blue". I want to bind the comboBox.selectedItem.Name to the textbox, so the textbox shows only "Blue" I used value converters and it works , Thank you

    WPF wpf csharp wcf help

  • WPF- Databinding set path
    D DeepakMega

    HI, This is a simple one, but i cant get it to work I have a combobox filled with color names and a small colored rectangle next to the names. I want to bind this combobox to a text box, such that when a color is selected in combobox, only the color name shows up in the text box. I need to do this programatically, not in xaml My combobox datatemplate is <DataTemplate x:Key="ColorText" > <StackPanel Orientation="Horizontal"> <Rectangle Width="20" Height="28" Fill="{Binding Name}" Stroke="#FF000000"/> <TextBlock Text ="{Binding Name}" /> </StackPanel> </DataTemplate> My current code to bind is Binding myBinding = new Binding("Text"); myBinding.Source = this.colorTextBox; myBinding.Mode = BindingMode.Default; this.comboBox.SetBinding(ComboBox.SelectedItemProperty, myBinding); But the result i get in text box is "System.Windows.Media.Color Blue" , i need only Blue to appear in the text box. comboBox.selectedItem object contains 2 types, one is color and other is Name as the datatemplate shows. Please help me to modify my above binding code , such that the text box shows only the name of the color and not "System.Windows.Media.Color Blue". These controls(combobox and textbox) are programatically generated.

    WPF wpf csharp wcf help

  • dynamic modify property of control
    D DeepakMega

    This one works! Thank you.

    WCF and WF css

  • dynamic modify property of control
    D DeepakMega

    The controls are dynamically added to the canvas. And when a control is selected by mouse, its fontsize property is shown in the textbox. So i tried to bind the controls fontsize to the textbox // here im trying to bind the controls fontsize property to the textbox (txtFontsize) // this code runs when an control is selected unbind(); //this unbinds any control in canvas binded to the textbox myBinding = new Binding("Text"); myBinding.Source = txtFontsize; // txtFontSize is the textbox which shows the selected control property myBinding.Mode = BindingMode.TwoWay; tb.SetBinding(TextBlock.FontSizeProperty, myBinding); // tb is the dynamically generated control This works one way , ie from the textbox to the controls property. The problem occurs if there are 2 controls in canvas. I select first one and change fontsize to 80 using the textbox, and it shows. But when i select the second control whose fontsize is still 12,it changes to 80. I want it to be like the propertywindow of visualstudio/blend. The one way binding works without converter,anyway ill try with a converter

    modified on Monday, October 19, 2009 1:42 AM

    WCF and WF css

  • dynamic modify property of control
    D DeepakMega

    Hi, I have couple of controls in canvas and a single text box, which shows the width property of selected controls in canvas. Now if i select any control in canvas it should reflect its width in textbox, and i should also be able to edit the width, which gets reflected back to the selected contorl. Just like the property window in blend. There are property grid controls, but they are too complicated for me, and i just want one property in text box. I have tried two way bindings programatically, but doesnt work properly. Is there any simple way to implement this

    WCF and WF css

  • Wrong Output, Cant catch the mistake (DFS)
    D DeepakMega

    rear=0; 1) queue[rear++]=source; // is same as queue[0]=source; and rear increments after assignment; 2) queue[++rear]=source; // is same as queue[1]=source; here rear increments before assignment; Its from the precedence of operators in c, check operator precedence table[^] The below program with minor changes as specified above runs fine in my turbo c , just add a getch() in main

    #include <stdio.h>
    #include <conio.h>
    #define MAX 6 // Node/Vertex count
    int adj[MAX][MAX]={ // Adjacency Matrix 2x2
    {0,1,1,1,0,0},
    {1,0,0,0,1,1},
    {1,0,0,0,0,0},
    {1,0,0,0,0,0},
    {0,1,0,0,0,0},
    {0,1,1,0,0,0}
    };

    int visited[MAX]; // Visited array
    void bfs(int goal); // bfs function

    int main ()
    {
    int s=3; //set Source node
    clrscr();
    printf("The nodes order is ");
    bfs(s);
    getch();
    return 0;

    }
    

    void bfs(int source)
    {
    int queue[MAX];
    int i,front,rear,root;
    front=rear=0;

       for (i=0;i<MAX;i++)
       {
    	   visited\[i\]=0;
       }
    
    
    
       queue\[rear++\]=source;
       visited\[source\]=1;
    
       printf("%d :",source);
    
    	while(rear!=front)
    		{
    			root=queue\[front\];
    			for(i=0;i<MAX;i++)
    
    				if (adj\[root\]\[i\] && !visited\[i\])
    				{
    					queue\[rear++\]=i;
    					visited\[i\]=1;
    					printf("%d",i);
    				}
    
    
    			front++;
    		}
    
    
       }
    
    C / C++ / MFC data-structures debugging tutorial

  • Wrong Output, Cant catch the mistake (DFS)
    D DeepakMega

    Changes made : for (i=0;i<MAX;i++) { visited[i]=0; } queue[rear++]=source; // its not ++rear as it becomes queue[1] instead of queue[0] ..... ..... while(rear!=front) { root=queue[front]; //no need to increment front here This is the output i got The nodes order is 3 :01245

    C / C++ / MFC data-structures debugging tutorial

  • Wrong Output, Cant catch the mistake (DFS)
    D DeepakMega

    What is your required output. Please specify the output needed for the above program inputs.

    C / C++ / MFC data-structures debugging tutorial

  • Need the code for Randomization of numbers using c#
    D DeepakMega

    Read this first How to post questions[^]

    C# csharp lounge

  • Wrong Output, Cant catch the mistake (DFS)
    D DeepakMega

    Sry im not good at algorithms, when i ran your code in vs there was an error in the 3rd line of the code below

    root=queue[front];
    for(i=1;i<=MAX;i++)
    {
    if (adj[root][i] && !visited[i])

    ie : adj[root][i] , the root value was garbage, and root=queue[front]; here front was 6 and queue[6] was uninitialized

    C / C++ / MFC data-structures debugging tutorial

  • How to Wipe/Clean Internet Explorer temporary internet Files, Cookies, History, Cache using C++/VC++/MFC
    D DeepakMega

    you can check this project Disk Cleaner[^]

    C / C++ / MFC c++ tutorial

  • Can i change window title of SHBrowseForFolder Function.
    D DeepakMega

    The SHBrowseForFolder [^] takes in a pointer to a BROWSERINFO[^] structure. You can assign the lpszTitle of BROWSERINFO and pass the BROWSERINFO to SHBrowseForFolder .

    C / C++ / MFC
  • Login

  • Don't have an account? Register

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