Click here to Skip to main content
15,889,704 members
Home / Discussions / C#
   

C#

 
AnswerRe: Graphic in C# Pin
Richard MacCutchan10-Apr-14 6:29
mveRichard MacCutchan10-Apr-14 6:29 
GeneralRe: Graphic in C# Pin
Member 1068390211-Apr-14 6:05
Member 1068390211-Apr-14 6:05 
AnswerRe: Graphic in C# Pin
V.10-Apr-14 22:53
professionalV.10-Apr-14 22:53 
AnswerRe: Graphic in C# Pin
Bernhard Hiller10-Apr-14 22:57
Bernhard Hiller10-Apr-14 22:57 
Questionchange interface type to other interface type Pin
Nico Haegens10-Apr-14 4:28
professionalNico Haegens10-Apr-14 4:28 
AnswerRe: change interface type to other interface type Pin
Richard Deeming10-Apr-14 4:41
mveRichard Deeming10-Apr-14 4:41 
GeneralRe: change interface type to other interface type Pin
Nico Haegens10-Apr-14 5:14
professionalNico Haegens10-Apr-14 5:14 
GeneralRe: change interface type to other interface type Pin
Richard Deeming10-Apr-14 6:11
mveRichard Deeming10-Apr-14 6:11 
Well either there's something else going on, or I've not understood your class hierarchy.

The following simplified version of what I think you're describing works perfectly:
C#
interface ICustomRepeater { }

class CustomGenericItemsControl : ICustomRepeater { }

class CustomGenericItemsControl<T> : CustomGenericItemsControl { }

class DummyTestClass { }

class Wrapper : CustomGenericItemsControl
{
    public CustomGenericItemsControl<DummyTestClass> Component
    {
        get { return new CustomGenericItemsControl<DummyTestClass>(); }
    }
}

static void Main()
{
    Wrapper wrapper = new Wrapper();
    ICustomRepeater control = (ICustomRepeater)wrapper.Component;
    Console.WriteLine(control);
}


From your error message, it would seem that the CustomGenericItemsControl<T> doesn't implement the ICustomRepeater interface, and doesn't inherit from a class that implements the ICustomRepeater interface.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: change interface type to other interface type Pin
Nico Haegens11-Apr-14 6:07
professionalNico Haegens11-Apr-14 6:07 
AnswerRe: change interface type to other interface type Pin
Keith Barrow10-Apr-14 5:12
professionalKeith Barrow10-Apr-14 5:12 
GeneralRe: change interface type to other interface type Pin
Nico Haegens10-Apr-14 6:26
professionalNico Haegens10-Apr-14 6:26 
GeneralRe: change interface type to other interface type Pin
Keith Barrow10-Apr-14 22:28
professionalKeith Barrow10-Apr-14 22:28 
GeneralRe: change interface type to other interface type Pin
Nico Haegens11-Apr-14 0:31
professionalNico Haegens11-Apr-14 0:31 
GeneralRe: change interface type to other interface type Pin
Keith Barrow11-Apr-14 0:38
professionalKeith Barrow11-Apr-14 0:38 
QuestionSerialize subclass of windows.forms.label Pin
DanielSheets10-Apr-14 3:08
DanielSheets10-Apr-14 3:08 
AnswerRe: Serialize subclass of windows.forms.label Pin
Ravi Bhavnani10-Apr-14 3:54
professionalRavi Bhavnani10-Apr-14 3:54 
QuestionDownload From Autoconfig Help Pin
LawlessBaron10-Apr-14 1:03
LawlessBaron10-Apr-14 1:03 
QuestionRe: Download From Autoconfig Help Pin
Eddy Vluggen10-Apr-14 3:02
professionalEddy Vluggen10-Apr-14 3:02 
AnswerRe: Download From Autoconfig Help Pin
LawlessBaron10-Apr-14 16:49
LawlessBaron10-Apr-14 16:49 
GeneralRe: Download From Autoconfig Help Pin
Eddy Vluggen11-Apr-14 7:40
professionalEddy Vluggen11-Apr-14 7:40 
Questionstrange behaviour of click method Pin
joost.versteegen10-Apr-14 0:28
joost.versteegen10-Apr-14 0:28 
AnswerRe: strange behaviour of click method Pin
Rob Philpott10-Apr-14 0:50
Rob Philpott10-Apr-14 0:50 
GeneralRe: strange behaviour of click method Pin
joost.versteegen10-Apr-14 1:13
joost.versteegen10-Apr-14 1:13 
GeneralRe: strange behaviour of click method Pin
Rob Philpott10-Apr-14 1:44
Rob Philpott10-Apr-14 1:44 
GeneralRe: strange behaviour of click method Pin
joost.versteegen10-Apr-14 1:47
joost.versteegen10-Apr-14 1:47 

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.