Search Results

Search found 23367 results on 935 pages for 'aix grid control'.

Page 72/935 | < Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >

  • Remap control key in gnome-terminal?

    - by Colin
    I just installed Ubuntu to get more familiar with it since I'll be using it in a new job shortly. I use Macs at home and in my current job, so I'd like to make it as Mac-like as possible. I've remapped the command and control characters using the following .xmodmap: remove control = Control_L Control_R remove mod4 = Super_L Super_R add control = Super_L Super_R add mod4 = Control_L Control_R Which works great for everything except the terminal, since Ctrl-C is now mapped to CMD-C, and still conflicts with what I'd like to use to copy. Is there any way I can remap the Control key just for the terminal? I'm willing to consider gnome-terminal alternatives if required.

    Read the article

  • Progress bar in data grid view

    - by Pat
    Is there a way to have a progress bar in a cell in a DataGridView? At design time, you can add a TextBox, Button, Image, Link, ComboBox, or CheckBox, but not a ProgessBar. Is there a better control in WPF that will allow this?

    Read the article

  • how to preserve filter values after opertion on grid.

    - by Pankaj Pareek
    Hi experts. I have some filter and one grid.And grid have some buttons like modify/edit.I am selecting some value from filters and getting some result in grid.now i want to modify some record.when i come again on grid data in filter should be remain same. There is two pages. one contain filters and grid second contain modify details. Thanks Pankaj Pareek.

    Read the article

  • ASP.NET and WIF: Showing custom profile username as User.Identity.Name

    - by DigiMortal
    I am building ASP.NET MVC application that uses external services to authenticate users. For ASP.NET users are fully authenticated when they are redirected back from external service. In system they are logically authenticated when they have created user profiles. In this posting I will show you how to force ASP.NET MVC controller actions to demand existence of custom user profiles. Using external authentication sources with AppFabric Suppose you want to be user-friendly and you don’t force users to keep in mind another username/password when they visit your site. You can accept logins from different popular sites like Windows Live, Facebook, Yahoo, Google and many more. If user has account in some of these services then he or she can use his or her account to log in to your site. If you have community site then you usually have support for user profiles too. Some of these providers give you some information about users and other don’t. So only thing in common you get from all those providers is some unique ID that identifies user in service uniquely. Image above shows you how new user joins your site. Existing users who already have profile are directed to users homepage after they are authenticated. You can read more about how to solve semi-authorized users problem from my blog posting ASP.NET MVC: Using ProfileRequiredAttribute to restrict access to pages. The other problem is related to usernames that we don’t get from all identity providers. Why is IIdentity.Name sometimes empty? The problem is described more specifically in my blog posting Identifying AppFabric Access Control Service users uniquely. Shortly the problem is that not all providers have claim called http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name. The following diagram illustrates what happens when user got token from AppFabric ACS and was redirected to your site. Now, when user was authenticated using Windows Live ID then we don’t have name claim in token and that’s why User.Identity.Name is empty. Okay, we can force nameidentifier to be used as name (we can do it in web.config file) but we have user profiles and we want username from profile to be shown when username is asked. Modifying name claim Now let’s force IClaimsIdentity to use username from our user profiles. You can read more about my profiles topic from my blog posting ASP.NET MVC: Using ProfileRequiredAttribute to restrict access to pages and you can find some useful extension methods for claims identity from my blog posting Identifying AppFabric Access Control Service users uniquely. Here is what we do to set User.Identity.Name: we will check if user has profile, if user has profile we will check if User.Identity.Name matches the name given by profile, if names does not match then probably identity provider returned some name for user, we will remove name claim and recreate it with correct username, we will add new name claim to claims collection. All this stuff happens in Application_AuthorizeRequest event of our web application. The code is here. protected void Application_AuthorizeRequest() {     if (string.IsNullOrEmpty(User.Identity.Name))     {         var identity = User.Identity;         var profile = identity.GetProfile();         if (profile != null)         {             if (profile.UserName != identity.Name)             {                 identity.RemoveName();                   var claim = new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", profile.UserName);                 var claimsIdentity = (IClaimsIdentity)identity;                 claimsIdentity.Claims.Add(claim);             }         }     } } RemoveName extension method is simple – it looks for name claims of IClaimsIdentity claims collection and removes them. public static void RemoveName(this IIdentity identity) {     if (identity == null)         return;       var claimsIndentity = identity as ClaimsIdentity;     if (claimsIndentity == null)         return;       for (var i = claimsIndentity.Claims.Count - 1; i >= 0; i--)     {         var claim = claimsIndentity.Claims[i];         if (claim.ClaimType == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name")             claimsIndentity.Claims.RemoveAt(i);     } } And we are done. Now User.Identity.Name returns the username from user profile and you can use it to show username of current user everywhere in your site. Conclusion Mixing AppFabric Access Control Service and Windows Identity Foundation with custom authorization logic is not impossible but a little bit tricky. This posting finishes my little series about AppFabric ACS and WIF for this time and hopefully you found some useful tricks, tips, hacks and code pieces you can use in your own applications.

    Read the article

  • IRM and Consumerization

    - by martin.abrahams
    As the season of rampant consumerism draws to its official close on 12th Night, it seems a fitting time to discuss consumerization - whereby technologies from the consumer market, such as the Android and iPad, are adopted by business organizations. I expect many of you will have received a shiny new mobile gadget for Christmas - and will be expecting to use it for work as well as leisure in 2011. In my case, I'm just getting to grips with my first Android phone. This trend developed so much during 2010 that a number of my customers have officially changed their stance on consumer devices - accepting consumerization as something to embrace rather than resist. Clearly, consumerization has significant implications for information control, as corporate data is distributed to consumer devices whether the organization is aware of it or not. I daresay that some DLP solutions can limit distribution to some extent, but this creates a conflict between accepting consumerization and frustrating it. So what does Oracle IRM have to offer the consumerized enterprise? First and foremost, consumerization does not automatically represent great additional risk - if an enterprise seals its sensitive information. Sealed files are encrypted, and that fundamental protection is not affected by copying files to consumer devices. A device might be lost or stolen, and the user might not think to report the loss of a personally owned device, but the data and the enterprise that owns it are protected. Indeed, the consumerization trend is another strong reason for enterprises to deploy IRM - to protect against this expansion of channels by which data might be accidentally exposed. It also enables encryption requirements to be met even though the enterprise does not own the device and cannot enforce device encryption. Moving on to the usage of sealed content on such devices, some of our customers are using virtual desktop solutions such that, in truth, the sealed content is being opened and used on a PC in the normal way, and the user is simply using their device for display purposes. This has several advantages: The sensitive documents are not actually on the devices, so device loss and theft are even less of a worry The enterprise has another layer of control over how and where content is used, as access to the virtual solution involves another layer of authentication and authorization - defence in depth It is a generic solution that means the enterprise does not need to actively support the ever expanding variety of consumer devices - the enterprise just manages some virtual access to traditional systems using something like Citrix or Remote Desktop services. It is a tried and tested way of accessing sealed documents. People have being using Oracle IRM in conjunction with Citrix and Remote Desktop for several years. For some scenarios, we also have the "IRM wrapper" option that provides a simple app for sealing and unsealing content on a range of operating systems. We are busy working on other ways to support the explosion of consumer devices, but this blog is not a proper forum for talking about them at this time. If you are an Oracle IRM customer, we will be pleased to discuss our plans and your requirements with you directly on request. You can be sure that the blog will cover the new capabilities as soon as possible.

    Read the article

  • Resources for using TFS for Agile Project Development?

    - by Amy P
    Our company just installed TFS for us to start using for project development processes and source control. They want us to start using it to manage our projects as well. We have a small team, no current bug or task tracking software, and 2 developers of the 3 have experience with any actual methodologies. What books, websites, and/or other information can you recommend for us to use to get started?

    Read the article

  • Is there a term for quasi-open source proprietary software?

    - by mwhite
    Say a company wants to keep development of new features of a piece of software internal, but wants to make the source code for previous versions public, up to and including existing public features, so that other people can benefit from using and modifying the software themselves, and even possibly contribute changes that can be applied to the development branch. Is there a term for this sort of arrangement, and what is the best way of accomplishing it using existing version control tools and platforms?

    Read the article

  • OnApplyTemplate not called in Custom Control

    - by Lasse O
    I am SICK AND TIRED of WPF and all its "if thats dosen't work, try this" fucking fixes ALL THE TIME, well heres one the collection: I have a Custom Control which uses some PART controls: [TemplatePart(Name = "PART_TitleTextBox", Type = typeof(TextBox))] [TemplatePart(Name = "PART_TitleIndexText", Type = typeof(Label))] [TemplatePart(Name = "PART_TimeCodeInText", Type = typeof(TextBlock))] [TemplatePart(Name = "PART_TimeCodeOutText", Type = typeof(TextBlock))] [TemplatePart(Name = "PART_ApprovedImage", Type = typeof(Image))] [TemplatePart(Name = "PART_CommentsImage", Type = typeof(Image))] [TemplatePart(Name = "PART_BookmarkedImage", Type = typeof(Image))] public class TitleBoxNew : Control { This control is overriding OnApplyTemplate: public override void OnApplyTemplate() { base.OnApplyTemplate(); InitializeEvents(); } Which works well, most of the time.. I have added the control inside a custom tab control in a window and somehow OnApplyTemplate is never called for that control! WHY IS WPF SO FUCKING RANDOM!?

    Read the article

  • Access to DataTemplate Control of WPF Toolkit DataGridCell at Runtime, How?

    - by LukePet
    I have a DataGrid defined with WPF Toolkit. The CellEditingTemplate of this DataGrid is associated at runtime with a custom function that build a FrameworkElementFactory element. Now I have to access to control that is inserted inside DataTemplate of CellEditingTempleta, but I do not know how to do. On web I found a useful ListView Helper... public static class ListViewHelper { public static FrameworkElement GetElementFromCellTemplate(ListView listView, Int32 column, Int32 row, String name) { if (row >= listView.Items.Count || row < 0) { throw new ArgumentOutOfRangeException("row"); } GridView gridView = listView.View as GridView; if (gridView == null) { return null; } if (column >= gridView.Columns.Count || column < 0) { throw new ArgumentOutOfRangeException("column"); } ListViewItem item = listView.ItemContainerGenerator.ContainerFromItem(listView.Items[row]) as ListViewItem; if (item != null) { GridViewRowPresenter rowPresenter = GetFrameworkElementByName<GridViewRowPresenter>(item); if (rowPresenter != null) { ContentPresenter templatedParent = VisualTreeHelper.GetChild(rowPresenter, column) as ContentPresenter; DataTemplate dataTemplate = gridView.Columns[column].CellTemplate; if (dataTemplate != null && templatedParent != null) { return dataTemplate.FindName(name, templatedParent) as FrameworkElement; } } } return null; } private static T GetFrameworkElementByName<T>(FrameworkElement referenceElement) where T : FrameworkElement { FrameworkElement child = null; for (Int32 i = 0; i < VisualTreeHelper.GetChildrenCount(referenceElement); i++) { child = VisualTreeHelper.GetChild(referenceElement, i) as FrameworkElement; System.Diagnostics.Debug.WriteLine(child); if (child != null && child.GetType() == typeof(T)) { break; } else if (child != null) { child = GetFrameworkElementByName<T>(child); if (child != null && child.GetType() == typeof(T)) { break; } } } return child as T; } } this code work with the ListView object but not with the DataGrid object. How can use something like this in DataGrid?

    Read the article

  • Webbrowser control: Get element value and store it into a variable.

    - by Khou
    Winform: Web browser Control The web browser has the following displayed content, within a html table. [Element] [Value] Name John Smith Email [email protected] For the example above, the html code, might look something like this <table> <tbody> <tr> <td><label class="label">Name</label></td> <td class="normaltext">John Smith</td> </tr> <tr> <td><label class="label">Email</label></td> <td><span class="normaltext">[email protected]</span></td> </tr> </tr> </tbody> </table> . I want to get the element value, the value to the right of the label. What is the best way to do this? .

    Read the article

  • How to use webbrowser control DocumentCompleted event in C# ?

    - by Margus
    Before starting writing this question, i was trying to solve following // 1. navigate to page // 2. wait until page is downloaded // 3. read and write some data from/to iframe // 4. submit (post) form The problem was, that if a iframe exists on a web page, DocumentCompleted event would get fired more then once (after each document has been completed). It was highly likely that program would have tried to read data from DOM that was not completed and naturally - fail. But suddenly while writing this question 'What if' monster inspired me, and i fix'ed the problem, that i was trying to solve. As i failed Google'ing this, i thought it would be nice to post it here. private int iframe_counter = 1; // needs to be 1, to pass DCF test public bool isLazyMan = default(bool); /// <summary> /// LOCK to stop inspecting DOM before DCF /// </summary> public void waitPolice() { while (isLazyMan) Application.DoEvents(); } private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e) { if(!e.TargetFrameName.Equals("")) iframe_counter --; isLazyMan = true; } private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { if (!((WebBrowser)sender).Document.Url.Equals(e.Url)) iframe_counter++; if (((WebBrowser)sender).Document.Window.Frames.Count <= iframe_counter) {//DCF test DocumentCompletedFully((WebBrowser)sender,e); isLazyMan = false; } } private void DocumentCompletedFully(WebBrowser sender, WebBrowserDocumentCompletedEventArgs e){ //code here } For now at least, my 5m hack seems to be working fine. Maybe i am really failing at querying google or MSDN, but i can not find: "How to use webbrowser control DocumentCompleted event in C# ?"

    Read the article

  • Cleanup for control inside a FlowDocument

    - by Thorarin
    I have a custom control that I use inside a FlowDocument. The control uses a System.Drawing.ImageAnimator to display transparent, animated GIF images. Why is this such a pain in the butt in WPF anyway? :P In my original implementation, this was causing memory leaks when a paragraph containing the control was being deleted from the document, because the ImageAnimator kept a reference to the control for event handling. I've now implemented a WeakEventManager pattern which seems to indeed fix the leak itself, but I would like to stop "OnFrameChanged" events from being fired if a particular animated GIF is not currently in the document, instead of relying on the garbage collector to eventually collect the control objects and my event manager to notice that there no longer are valid listeners to the event. Basically, I would like to take a more active role in this and have the control react to being removed from the FlowDocument. Is there some way to do this? I've been unable to find it. OnVisualParentChanged doesn't get fired, because the direct parent (a Paragraph) is unchanged.

    Read the article

  • Extjs4: editable rowbody

    - by peter
    in my first ExtJs4 project i use a editable grid with the feature rowbody to have a big textfield displayed under each row. I want it to be editable on a dblclick. I succeeded in doing so by replacing the innerHTML of the rowbody by a textarea but the special keys don't do what they are supposed to do (move the cursor). If a use the textarea in a normal field i don't have this probem. Same problem in IE7 and FF4 gridInfo = Ext.create('Ext.ux.LiveSearchGridPanel', { id: 'gridInfo', height: '100%', width: '100%', store: storeInfo, columnLines: true, selType: 'cellmodel', columns: [ {text: "Titel", flex: 1, dataIndex: 'titel', field:{xtype:'textfield'}}, {text: "Tags", id: "tags", flex: 1, dataIndex: 'tags', field:{xtype:'textfield'}}, {text: "Hits", dataIndex: 'hits'}, {text: "Last Updated", renderer: Ext.util.Format.dateRenderer('d/m/Y'), dataIndex: 'lastChange'} ], plugins: [ Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 }) ], features: [ { ftype: 'rowbody', getAdditionalData: function(data, idx, record, orig) { var headerCt = this.view.headerCt, colspan = headerCt.getColumnCount(); return { rowBody: data.desc, //the big textfieldvalue, can't use a textarea here 8< rowBodyCls: this.rowBodyCls, rowBodyColspan: colspan }; } }, {ftype: 'rowwrap'} ] }); me.on('rowbodydblclick', function(gridView, el, event, o) { ... rb = td.down('.x-grid-rowbody').dom; var value = rb.innerText?rb.innerText:rb.textContent; rb.innerHTML = ''; Ext.create('Ext.form.field.TextArea', { id: 'textarea1', value : value, renderTo: rb, border: false, enterIsSpecial: true, enableKeyEvents: true, disableKeyFilter: true, listeners: { 'blur': function(el, o) { rb.innerHTML = el.value; }, 'specialkey': function(field, e){ console.log(e.keyCode); //captured but nothing happens } } }).show(); damn, can't publish my own solution, looks like somebody else has to answer, anyway, here is the function that works function editDesc(me, gridView, el, event, o) { var width = Ext.fly(el).up('table').getWidth(); var rb = event.target; var value = rb.innerText?rb.innerText:rb.textContent; rb.innerHTML = '' var txt = Ext.create('Ext.form.field.TextArea', { value : value, renderTo: rb, border: false, width: width, height: 300, enterIsSpecial: true, disableKeyFilter: true, listeners: { 'blur': function(el, o) { var value = el.value.replace('\n','<br>') rb.innerHTML = value; }, 'specialkey': function(field, e){ e.stopPropagation(); } } }); var txtTextarea = Ext.fly(rb).down('textarea'); txtTextarea.dom.style.color = 'blue'; txtTextarea.dom.style.fontSize = '11px'; } Hi Molecule Man, as an alternative to the approach above i tried the Ext.Editor. It works but i want it inline but when i render it to the rowbody, the field blanks and i have no editor, any ideas ? gridInfo = Ext.create('Ext.grid.Panel', { id: 'gridInfo', height: '100%', width: '100%', store: storeInfo, columnLines: true, selType: 'cellmodel', viewConfig: {stripeRows: false, trackOver: true}, columns: [ {text: "Titel", flex: 1, dataIndex: 'titel', field:{xtype:'textfield'}}, ... {text: "Last Updated", renderer: Ext.util.Format.dateRenderer('d/m/Y'), dataIndex: 'lastChange'} ], plugins: [ Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 }) ], features: [ { ftype: 'rowbody', getAdditionalData: function(data, idx, record, orig) { var headerCt = this.view.headerCt, colspan = headerCt.getColumnCount(); return { rowBody: data.desc, rowBodyCls: this.rowBodyCls, rowBodyColspan: colspan }; } } ], listeners:{ rowbodyclick: function(gridView, el, event) { //werkt editDesc(this, gridView, el, event); } } }); function editDesc(me, gridView, el, event, o) { var rb = event.target; me.txt = new Ext.Editor({ field: {xtype: 'textarea'}, updateEl: true, cancelOnEsc: true, floating: true, renderTo: rb //when i do this, the field becomes empty and i don't get the editor }); me.txt.startEdit(el); }

    Read the article

  • For each <item> in CheckedListBox. <item> returns as Object and not as Control

    - by Tivie
    Hello there. I have a CheckedListBox previously populated. I want to loop with a "for each / next" through all items in the CheckedListBox and do a lot of "stuff" with each iteration element of the checkedlistbox. example code: For Each item In CheckedListBox1.Items If item.Checked = True Then 'do stuff like item.BackColor = Color.Blue Else 'do other stuff item.BackColor = Color.Brown End If Next the problem is that is an 'Object' type and not a 'Control' type. If I force the iteration var As CheckBox, it throws an InvalidCastException saying that type 'System.String' can't be associated with type 'System.Windows.Forms.CheckBox' I know I can easily work around using for i=0 to CheckedListBox.Items.Count - 1 but I want to use a for each /next loop since I have a lot of code in that loop (and With can't be used) and always poiting directly to the object is something I wish to avoid and I really need the code to be as simple as possible. I actually spent one afternoon looking for this but couldn't find any answer. If someone could be kind enough to enlight me in this, it would be extremely appreciated. Best regards

    Read the article

  • Why wouldn't the default Control Adapter mappings work on Chrome or Safari?

    - by Deane
    I have confirmed that my Control Adapters are not triggering in Chrome and Safari. I've debugged, and the breakpoints inside the adapters just don't get hit in Chrome/Safari, when they work perfectly find in Firefox/IE. So, for Chrome/Safari, IIS is just ignoring the mapping. My AdapterMappings.browser file looks like this: <browsers> <browser refID="Default"> <controlAdapters> [...adapters here....] </controlAdapters> </browser> </browsers> This should provide mappings for all browsers, correct? I used the Charles proxy to check what user agents were being sent. They are: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1064 Safari/532.5 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7 Any idea why this would be? Everything I've read tells me that my browser mappings are correct? And, as I said this works for IE/Firefox, so I know my configuration is technically correct.

    Read the article

  • Compact Framework - ListView like control ?

    - by no9
    Hello. I have been playing with Compact Framework lately and i need some advice. I have a collection of items. One of the properties on each item is a string type that holds XML. This XML defines image, font, style etc... Im looking for a control (similar to listView) that would replace listBox control. Im not satisfied with listView control, because it is very limited on items level. The control has to be dynamic enough so that my parser could parse the XML and customise the control. For a start i would like to show an image and perhaps some font styles for each row in the control. Here is a sample what im trying to achieve: Any suggestions?

    Read the article

  • What to use for version control with Visual Studio 2008 for inhouse projects?

    - by Boog
    We want to put a number of our in-house projects under version control. Our projects are C# .NET applications and assemblies. We originally decided to go Microsoft all the way (as is the norm around here), and tried installing Visual Studio Team Foundation Server. To say the least, it was way more trouble of trying to get a successful install than it's worth, and I'm afraid we don't have a entire server to dedicate to TFS itself, as the installer seems to insist. We also considered a generic solution like Subversion or CVS, or possibly some kind of free online hosting that doesn't make our source publicly available under some license like Google Code appears to. Does anyone have any suggestions for us that would best fit our in-house MS environment? We'd also get some benefit out of some kind of project management tools if they were nicely integrated in to the solution, but this would only be a perk. I should also mention that we haven't entirely ruled out TFS, but it's looking like a pain, so anything you guys have to say for or against it would be helpful.

    Read the article

  • ASP.NET: CSS friendly calendar control

    - by pbz
    I'm using the built-in Calendar control. It works, but in a few places the way the HTML is rendered is broken or not CSS-friendly and unfortunately cannot be changed (it's hard coded). I was hoping they would fix this in .NET 4.0, but as far as I can tell the Calendar control hasn't been changed at all. Also, as far as I know, there's no CSS adapter for the Calendar control. So, I would need a control that would: Allow me to customize the content of each cell (like OnDayRender works) Allow me to assign CSS classes to any HTML it may render Not render anything automatically that cannot be turned off, except layout code No auto-postback or auto-JS code (I can handle these by hand using simple links or custom JS calls) Basically a simple calendar view control that would give me full rendering control. What would you recommend? Thanks!

    Read the article

  • ASP.NET MVC : Good Replacement for User Control?

    - by David Lively
    I found user controls to be incredibly useful when working with ASP.NET webforms. By encapsulating the code required for displaying a control with the markup, creation of reusable components was very straightforward and very, very useful. While MVC provides convenient separation of concerns, this seems to break encapsulation (ie, you can add a control without adding or using its supporting code, leading to runtime errors). Having to modify a controller every time I add a control to a view seems to me to integrate concerns, not separate them. I'd rather break the purist MVC ideology than give up the benefits of reusable, packaged controls. I need to be able to include components similar to webforms user controls throughout a site, but not for the entire site, and not at a level that belongs in a master page. These components should have their own code not just markup (to interact with the business layer), and it would be great if the page controller didn't need to know about the control. Since MVC user controls don't have codebehind, I can't see a good way to do this. Update FINALLY, a good (and, in retrospect, obvious) way to accomplish this. using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace K.ObjectModel.Controls { public class TestControl : ViewUserControl { protected override void Render(System.Web.UI.HtmlTextWriter writer) { writer.Write("Hello World"); base.Render(writer); } } } Create a new class which inherits ViewUserControl Override the .Render() method as shown above. Register the control via its associated ASCX as you would in a webForm: <%@ Register TagName="tn" TagPrefix="k" Src="~/Views/Navigation/LeftBar.ascx"%> Use the corresponding tag in whatever view or master page that you need: <k:tn runat="server"/> Make sure your .ascx inherits your new control: <%@ Control Language="C#" Inherits="K.ObjectModel.Controls.TestControl" %> Voila, you're up and running. This is tested with ASP.NET MVC 2, VS 2010 and .NET 4.0. Your custom tag references the ascx partial view, which inherits from the TestControl class. The control then overrides the Render() method, which is called to render the view, giving you complete control over the process from tag to output. Why does everyone try to make this so much harder than it has to be?

    Read the article

  • Event handling for a dynamically added user control

    - by francisf
    Hi, I have a user control say SearchVendor.ascx which contains 4 buttons a gridview and another user control. I need to load the control dynamically actually as a modal pop up I get this code VendorProductSearch uc = Page.LoadControl("~/Controls/Proposal/VendorProductSearch.ascx") as VendorProductSearch; uc.ShowVendorProductSearch(true); _tempPlaceHolder.Controls.Add(uc); it works fine the control gets loaded properly but onclick of any button the second time the control disappears ??? I want the dynamically added control to remain until the user clicks on the cancel button Any idea as to how to achive this ? Thanks & Regards, Francis P.

    Read the article

  • WPF: Template Binding in Control template

    - by Sam
    I have the following control template. I wish to set the source property for the image control in the control template using Template Binding. But since this is a control template for button control and the button control doesn't have source property, i can't use TemplateBinding in this case. <ControlTemplate x:Key="BtnTemplate" TargetType="Button"> <Border CornerRadius="5" Margin="15" Cursor="Hand"> <StackPanel> <Image Name="Img" Style="{StaticResource ImageStyle}" Source="temp.jpg" Height="100" Width="100" Margin="5"></Image> <Label Content="{TemplateBinding Content}" Background="Transparent" Margin="2"></Label> </StackPanel> </Border> </ControlTemplate> Since i have to set different images for different instances of button, i can't hardcode the path as well. Please let me know how to tackle this situation.

    Read the article

  • Silverlight horizontal stretch and get position issue

    - by David
    I have a Grid (container) wich in turn has several grids(subContainers) arranged by rows. Each one of those "subContainers" has diferent columns and controls. And each of those "subContainers" has the horizontal alignment set to stretch, and it has to stay that way, since the layout this viewer depends on it. I use the "container" to set each control on it's adequate position. So far so good. Now comes my headache... I want to remove the control from the grid and put it in a canvas, at the same exact position, only, the position it returns is as if the control is set to the beggining of the grid and not it's true position. For testing purposes, I've set the "subContainters" horizontal alignment to center and (despite the layout is totally wrong) every control is in it's right position when sent to a canvas, wich it doesn't happen when HA = stretch. Here's the code I'm using to get position: GeneralTransform gt = nc.TransformToVisual(gridZoom); Point offset = gt.Transform(new Point()); So you can understand, for example, my first control should be somewhere like (80, 1090), but the point that I get is (3,3). Can anyone help me? Thanks

    Read the article

< Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >