Click here to Skip to main content
15,891,607 members
Home / Discussions / C#
   

C#

 
GeneralRe: lock .net code Pin
led mike19-Aug-08 6:04
led mike19-Aug-08 6:04 
JokeRe: lock .net code Pin
Bassam Saoud19-Aug-08 9:18
Bassam Saoud19-Aug-08 9:18 
AnswerRe: lock .net code Pin
chaiguy133719-Aug-08 15:42
chaiguy133719-Aug-08 15:42 
QuestionContextMenu Help Pin
Harvey Saayman19-Aug-08 3:21
Harvey Saayman19-Aug-08 3:21 
AnswerRe: ContextMenu Help Pin
Abhijit Jana19-Aug-08 7:03
professionalAbhijit Jana19-Aug-08 7:03 
GeneralRe: ContextMenu Help Pin
Harvey Saayman19-Aug-08 9:02
Harvey Saayman19-Aug-08 9:02 
AnswerRe: ContextMenu Help Pin
DaveyM6919-Aug-08 12:41
professionalDaveyM6919-Aug-08 12:41 
GeneralRe: ContextMenu Help Pin
Harvey Saayman19-Aug-08 20:36
Harvey Saayman19-Aug-08 20:36 
i cant find any events that give me the info i need as args. i dont seem to have ItemClicked either. Im using System.Windows.Controls.ContextMenu

in the code behind file, i got this so far...

ContextMenu myContextMenu; 

private void Border_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
{
    foreach (CellContent cell in Cells) // foreach the array that contains the cells
    {
        if (((Border)sender).Name == cell.CellBorder.Name) // if the sender was found in the array
        {
            //
            // Some graphical stuff of the cell change here
            //

            myContextMenu = new ContextMenu();

            myContextMenu.Items.Add("Day Off");
            myContextMenu.Items.Add("-");

            ShiftCtxDataContext shiftCtx = new ShiftCtxDataContext(sqlConnString);
            
            // query the shift table
            var queryResult = (from myShifts in shiftCtx.Shifts
                              select myShifts.SHF_Name_VC30);

            // foreach the results of the query and add it to the context menus items
            foreach (var item in queryResult)
            {
                myContextMenu.Items.Add(item.ToString());
            }

            // display context menu
            myContextMenu.IsOpen = true;
        }
    }
}


any ideas?

Thanx

Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL

you.suck = (you.passion != Programming)

GeneralRe: ContextMenu Help Pin
DaveyM6920-Aug-08 2:46
professionalDaveyM6920-Aug-08 2:46 
GeneralRe: ContextMenu Help Pin
Harvey Saayman20-Aug-08 2:57
Harvey Saayman20-Aug-08 2:57 
QuestionProblem with databinding to property of interface type. Pin
Member 140473319-Aug-08 3:08
Member 140473319-Aug-08 3:08 
AnswerRe: Problem with databinding to property of interface type. Pin
MidwestLimey19-Aug-08 4:37
professionalMidwestLimey19-Aug-08 4:37 
GeneralRe: Problem with databinding to property of interface type. Pin
Member 140473319-Aug-08 19:43
Member 140473319-Aug-08 19:43 
AnswerRe: Problem with databinding to property of interface type. Pin
Member 140473320-Aug-08 21:14
Member 140473320-Aug-08 21:14 
QuestionMicrosoft.SqlServer.Management.Smo problem Pin
hdv21219-Aug-08 2:58
hdv21219-Aug-08 2:58 
AnswerRe: Microsoft.SqlServer.Management.Smo problem Pin
Csharp_Raja19-Aug-08 3:42
Csharp_Raja19-Aug-08 3:42 
GeneralRe: Microsoft.SqlServer.Management.Smo problem Pin
hdv21219-Aug-08 4:08
hdv21219-Aug-08 4:08 
GeneralRe: Microsoft.SqlServer.Management.Smo problem Pin
Csharp_Raja19-Aug-08 4:50
Csharp_Raja19-Aug-08 4:50 
GeneralRe: Microsoft.SqlServer.Management.Smo problem Pin
hdv21219-Aug-08 4:55
hdv21219-Aug-08 4:55 
GeneralRe: Microsoft.SqlServer.Management.Smo problem Pin
Csharp_Raja20-Aug-08 4:34
Csharp_Raja20-Aug-08 4:34 
Questionout of memory:at System.image.fromfile(string filename,boolean useembeddedcolormanagement) Pin
vishnukamath19-Aug-08 2:44
vishnukamath19-Aug-08 2:44 
AnswerRe: out of memory:at System.image.fromfile(string filename,boolean useembeddedcolormanagement) Pin
Manas Bhardwaj19-Aug-08 5:16
professionalManas Bhardwaj19-Aug-08 5:16 
QuestionAccess to the file in the same directory Pin
arkiboys19-Aug-08 2:17
arkiboys19-Aug-08 2:17 
AnswerPlease don't repost questions just to bump them to the top. Pin
Pete O'Hanlon19-Aug-08 2:21
mvePete O'Hanlon19-Aug-08 2:21 
GeneralRe: Please don't repost questions just to bump them to the top. Pin
arkiboys19-Aug-08 2:26
arkiboys19-Aug-08 2:26 

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.