user-controls

    0熱度

    1回答

    TL; DR 是否有可能使用UserControl的Inherits="..."在代碼塊中定義的類,而不是在已編譯的類,以取代代碼隱藏? 我有一個ASP.NET Web應用程序,我很快就需要修補,但我只允許更新.aspx和.ascx文件......這是不可能對我來說,重新編譯和發佈.dll文件(由於客戶對我們的改變管理流程)。 在應用程序中,我有一個UserControl從文件的代碼隱藏類設置爲I

    -1熱度

    1回答

    我有一個自定義的FlowLayoutPanel:一個「AlbumFlowLayout」,它從FlowLayoutPanel繼承並用於存放UserControls(「AlbumItems」)的集合。通常情況下,這將駐留在形式(「FrmMain」)上,使項目的層次是: Form ("FrmMain") AlbumFlowLayout ("AlbumFlowLayout1") Alb

    0熱度

    1回答

    我有一個StepsWnd窗口,其中UserControl StepProp被使用兩次,在一個單獨的文件中聲明。 <Window x:Class="MyProject.StepsWnd" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microso

    0熱度

    2回答

    我在MainWindow.xaml中有Grid。 Grid填寫我的UserControl(修改Button)。 在靜態類全局變量中,我有bool變量,這是在Button按更改。現在我需要改變Grid這個bool變量的背景顏色。 麻煩的是,我不能從其他的MainWindow.xaml.cs代碼後面到達Grid。 Global.cs: public static class Globals

    0熱度

    1回答

    我正在嘗試重新使用我正在儘可能寫入的XAML。 現在,我想在DataGrid中顯示我的對象。我的物品通過遺產共享一些共同的屬性。因此,我想用網格創建一個UserControl,併爲其中的每個對象共同定義一些屬性列。因此,一些看似是: <UserControl Name="MyCustomGrid"> <Grid> <DataGrid> <!-- Common S

    0熱度

    1回答

    我想重用控件,但其中一個方案需要上下文菜單,而其他方案則不需要。這是我的嘗試。 public partial class RP8Grid : UserControl { public bool UseContextMenu { get { return (bool)GetValue(UseContextMenuProperty); } set { SetValu

    0熱度

    2回答

    我已經創建了一個用戶控件,裏面有一個單選按鈕。我還創建了一個單選按鈕類型的公共屬性,併爲它指定了單選按鈕,因此可以在後面的aspx頁面代碼中進行訪問。 public partial class WebUserControl : System.Web.UI.UserControl { public RadioButton radiobtn { get; set; } prot

    -1熱度

    3回答

    我有一個datacontrol.cs(用戶控件),其是含有具有與CurrentValue的的參數的方法和TextBox1的代碼隱藏窗口 public void bindvalue(float currentvalue) { textbox1.Clear(); textbox1.Text = currentvalue.ToString(); } 我有一個表格,在這裏加入在

    -2熱度

    1回答

    我將UserControl的一個實例傳遞給繼承了Page類和Itemplate接口的類的構造函數,我保存了類型爲userControl的實例,Now我如何訪問用戶控件的方法。 對於防爆,的MyUserControl文件名是uc_test和類datagridtemplate:頁,了Itemplate 我的用戶具有局部類名uc_test和有方法 public int addtwonumbers()

    0熱度

    1回答

    我在Shiny中有一個selectInput小部件。 我要控制的字體大小分別同時爲label參數,以及用於小部件本身的輸入文本(即,的choices和selected參數的文本)。 初始[樣式更少]輸出看起來是這樣的: selectInput(inputId = "inId", label = "Different Font Size...", choices = "...From This")